0% found this document useful (0 votes)
2 views

Assignment

java assignment

Uploaded by

Hetal Mer
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Assignment

java assignment

Uploaded by

Hetal Mer
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 31

What is relational data model

Relational data model is the primary data model, which is used


widely around the world for data storage and processing. This
model is simple and it has all the properties and capabilities
required to process data with storage efficiency.

Concepts
Tables − In relational data model, relations are saved in the format of Tables.
This format stores the relation among entities. A table has rows and columns,
where rows represents records and columns represent the attributes.
Tuple − A single row of a table, which contains a single record for that relation
is called a tuple.
Relation instance − A finite set of tuples in the relational database system
represents relation instance. Relation instances do not have duplicate tuples.
Relation schema − A relation schema describes the relation name (table
name), attributes, and their names.
Relation key − Each row has one or more attributes, known as relation key,
which can identify the row in the relation (table) uniquely.
Attribute domain − Every attribute has some pre-defined value scope, known
as attribute domain.
Constraints
Every relation has some conditions that must hold for it to be a valid relation.
These conditions are called Relational Integrity Constraints. There are
three main integrity constraints −
Key constraints
Domain constraints
Referential integrity constraints

What is entity set and relationship set


What is Entity Set in DBMS?
Entity Set
An entity set is a group of entities of the same entity type.
For example, an entity set of students, an entity set of motorbikes, an entity of
smartphones, an entity of customers, etc.
Entity sets can be classified into two types:
1. Strong Entity Set:
In a DBMS, a strong entity set consists of a primary key.
For example, an entity of motorbikes with the attributes, motorbike's registration
number, motorbike's name, motorbike's model, and motorbike's colour.
Below is the representation of a strong entity set in tabular form:

Example of Entity Relationship Diagram representation of the above strong entity


set:

2. Weak Entity Set:


In a DBMS, a weak entity set does not contain a primary key.
For example, An entity of smartphones with its attributes, phone's name, phone's colour, and phone's
RAM.
Below is the representation of a weak entity set in tabular form:

Example of
Entity
Relationship
Diagram
representation of the above weak entity set:

What is

Relationship Set in DBMS?


Relationship set in a Database Management System (DBMS) is
essential as it provides the ability to store, recover, and oversee
endless sums of information effectively in cutting-edge data
administration, hence making a difference in organizations.
In a Relational database, relationship sets are built up by utilizing
keys, such as primary and foreign keys, to interface related records
over distinctive tables.
Understanding and appropriately characterizing relationship sets is
fundamental for planning a well-organized and utilitarian database
framework, guaranteeing the exact representation and administration
of information.
What is a Relation?
A Relation in a database management system (DBMS) organizes
information into rows and columns. This organized arrangement
makes a difference in information storing and recovering information
proficiently. Relations permit us to query information utilizing SQL
commands like SELECT, Update, Insert, and Delete. Henceforth, it
becomes easier and more demanding to control and extract data from
the database.
Relations are alluded to as tables within the database management
system.
What is a Relationship Set?
It is a set of Relationships of the Same type. Mathematical Relation on
m > 2 (Possibly non-distinct) entity Sets.
If E1, E2,...... En are the entity sets for the Relationship Set R is a
subset of {(e1, e2,... en) | e1 € E1, e2 € E2....en € En} Where (e1,
e2,...en) is a Relationship.
For Example, (E-R Diagram)

Characteristics of Relationship Set


Degree: Degree of a relationship set indicates to the number of

properties related with the relationship set.


Arity: Arity of a relationship set indicates the number of taking part

relations. It can be like double (including two relations), ternary


(including three relations), and so on.
Cardinality: Cardinality characterizes the number of occurrences or

records that can be related with each substance on both sides of the
relationship.
This permits for the execution of different sorts of connections, such as
one-to-one, one-to-many, and many-to-many, reflecting real-world
associations between substances.
Degree of Relationship Set
It denotes the number of entity sets that belong to that particular
relationship set is called the degree of that relationship set.
Degree of a Relationship Set = the number of entity set that
belongs to that particular relationship set
Relationship Set Example With Tables
Let 'Customer' and 'Loan' entity sets defines the Relationship 'set
Borrow' to denote the association between Customer and bank loans.

What is UML class diagram


A UML class diagram is a visual tool that represents the structure of
a system by showing its classes, attributes, methods, and the
relationships between them. It helps everyone involved in a project—
like developers and designers—understand how the system is
organized and how its components interact.
What are class Diagrams?
Class diagrams are a type of UML (Unified Modeling Language)
diagram used in software engineering to visually represent the
structure and relationships of classes within a system i.e. used to
construct and visualize object-oriented systems.
In these diagrams, classes are depicted as boxes, each containing
three compartments for the class name, attributes, and methods.
Lines connecting classes illustrate associations, showing relationships
such as one-to-one or one-to-many.
Class diagrams provide a high-level overview of a system’s design,
helping to communicate and document the structure of the software.
They are a fundamental tool in object-oriented design and play a
crucial role in the software development lifecycle.
If you want to enhance your skills in creating effective class
diagrams, the System Design Course offers step-by-step guidance
on mastering UML and class diagrams.
What is a class?
In object-oriented programming (OOP), a class is a blueprint or
template for creating objects. Objects are instances of classes, and
each class defines a set of attributes (data members) and methods
(functions or procedures) that the objects created from that class will
possess. The attributes represent the characteristics or properties of
the object, while the methods define the behaviors or actions that the
object can perform.
UML Class Notation
class notation is a graphical representation used to depict classes and
their relationships in object-oriented modeling.
1.Class Name:

The name of the class is typically written in the top compartment of


the class box and is centered and bold.
2.Attributes:

Attributes, also known as properties or fields, represent the data


members of the class. They are listed in the second compartment of
the class box and often include the visibility (e.g., public, private) and
the data type of each attribute.
3.Methods:

Methods, also known as functions or operations, represent the


behavior or functionality of the class. They are listed in the third
compartment of the class box and include the visibility (e.g., public,
private), return type, and parameters of each method.
4.Visibility Notation:

Visibility notations indicate the access level of attributes and


methods. Common visibility notations include:
+ for public (visible to all classes)

- for private (visible only within the class)


# for protected (visible to subclasses)

~ for package or default visibility (visible to classes in the same

package)
Parameter Directionality
In class diagrams, parameter directionality refers to the indication of
the flow of information between classes through method parameters.
It helps to specify whether a parameter is an input, an output, or both.
This information is crucial for understanding how data is passed
between objects during method calls.

Relationships between classes


In class diagrams, relationships between classes describe how classes
are connected or interact with each other within a system. There are
several types of relationships in object-oriented modeling, each
serving a specific purpose. Here are some common types of
relationships in class diagrams:
1. Association
An association represents a bi-directional relationship between two
classes. It indicates that instances of one class are connected to
instances of another class. Associations are typically depicted as a
solid line connecting the classes, with optional arrows indicating the
direction of the relationship.
Let’s understand assoiation using an example:
Let’s consider a simple system for managing a library. In this system,
we have two main entities: Book and Library. Each Library contains
multiple Books, and each Book belongs to a specific Library. This
relationship between Library and Book represents an association.
The “Library” class can be considered the source class because it
contains a reference to multiple instances of the “Book” class. The
“Book” class would be considered the target class because it belongs
to a specific library.

2. Directed Association
A directed association in a UML class diagram represents a
relationship between two classes where the association has a
direction, indicating that one class is associated with another in a
specific way.
In a directed association, an arrowhead is added to the association
line to indicate the direction of the relationship. The arrow points from
the class that initiates the association to the class that is being
targeted or affected by the association.
Directed associations are used when the association has a specific
flow or directionality, such as indicating which class is responsible for
initiating the association or which class has a dependency on another.
Consider a scenario where a “Teacher” class is associated with a
“Course” class in a university system. The directed association arrow
may point from the “Teacher” class to the “Course” class, indicating
that a teacher is associated with or teaches a specific course.
The source class is the “Teacher” class. The “Teacher” class initiates
the association by teaching a specific course.
The target class is the “Course” class. The “Course” class is affected
by the association as it is being taught by a specific teacher.

3. Aggregation
Aggregation is a specialized form of association that represents a
“whole-part” relationship. It denotes a stronger relationship where one
class (the whole) contains or is composed of another class (the part).
Aggregation is represented by a diamond shape on the side of the
whole class. In this kind of relationship, the child class can exist
independently of its parent class.
Let’s understand aggregation using an example:
The company can be considered as the whole, while the employees
are the parts. Employees belong to the company, and the company
can have multiple employees. However, if the company ceases to
exist, the employees can still exist independently.

4. Composition
Composition is a stronger form of aggregation, indicating a more
significant ownership or dependency relationship. In composition, the
part class cannot exist independently of the whole class. Composition
is represented by a filled diamond shape on the side of the whole
class.
Let’s understand Composition using an example:
Imagine a digital contact book application. The contact book is the
whole, and each contact entry is a part. Each contact entry is fully
owned and managed by the contact book. If the contact book is
deleted or destroyed, all associated contact entries are also removed.
This illustrates composition because the existence of the contact
entries depends entirely on the presence of the contact book. Without
the contact book, the individual contact entries lose their meaning and
cannot exist on their own.

5. Generalization(Inheritance)
Inheritance represents an “is-a” relationship between classes, where
one class (the subclass or child) inherits the properties and behaviors
of another class (the superclass or parent). Inheritance is depicted by
a solid line with a closed, hollow arrowhead pointing from the subclass
to the superclass.
In the example of bank accounts, we can use generalization to
represent different types of accounts such as current accounts,
savings accounts, and credit accounts.
The Bank Account class serves as the generalized representation of all
types of bank accounts, while the subclasses (Current Account,
Savings Account, Credit Account) represent specialized versions that
inherit and extend the functionality of the base class.

6. Realization (Interface Implementation)


Realization indicates that a class implements the features of an
interface. It is often used in cases where a class realizes the
operations defined by an interface. Realization is depicted by a dashed
line with an open arrowhead pointing from the implementing class to
the interface.
Let’s consider the scenario where a “Person” and a “Corporation” both
realizing an “Owner” interface.
7. Dependency Relationship
A dependency exists between two classes when one class relies on
another, but the relationship is not as strong as association or
inheritance. It represents a more loosely coupled connection between
classes. Dependencies are often depicted as a dashed arrow.
Let’s consider a scenario where a Person depends on a Book.
Person Class: Represents an individual who reads a book. The

Person class depends on the Book class to access and read the
content.
Book Class: Represents a book that contains content to be read by a

person. The Book class is independent and can exist without the
Person class.
The Person class depends on the Book class because it requires
access to a book to read its content. However, the Book class does not
depend on the Person class; it can exist independently and does not
rely on the Person class for its functionality.

8. Usage(Dependency) Relationship
A usage dependency relationship in a UML class diagram indicates
that one class (the client) utilizes or depends on another class (the
supplier) to perform certain tasks or access certain functionality. The
client class relies on the services provided by the supplier class but
does not own or create instances of it.
In UML class diagrams, usage dependencies are typically represented
by a dashed arrowed line pointing from the client class to the supplier
class.
The arrow indicates the direction of the dependency, showing that
the client class depends on the services provided by the supplier
class.
Consider a scenario where a “Car” class depends on a “FuelTank”
class to manage fuel consumption.
The “Car” class may need to access methods or attributes of the
“FuelTank” class to check the fuel level, refill fuel, or monitor fuel
consumption.
In this case, the “Car” class has a usage dependency on the
“FuelTank” class because it utilizes its services to perform certain
tasks related to fuel management.

What is meta data


Metadata is simply defined as data about data. It means it is a
description and context of the data. It helps to organize, find and
understand data. Let me explain to you by giving a real-world example
of metadata:
Every time you take a photo with today’s cameras a bunch of
metadata is gathered and saved with it. Such as
File name,
Size of the file,
Date and time,
Camera settings etc.
Meta data in Relational database:
Relational databases store and provide access not only to data but
also metadata in a structure called data dictionary or system catalog.
It holds information about:
tables,
columns,
data types,
table relationship,
constraints etc.
Data dictionary:
A data dictionary is a collection of descriptions of the data objects
or items in a data model for the benefit of programmers and others
who need to refer to them.
A data dictionary contains a list of all files in the database, the
number of records in each file, and the names and types of each
field. Most database management systems keep the data dictionary
hidden from users to prevent them from accidentally destroying its
contents.
Accessing metadata in RDBMS:
RDBMS provides access to their metadata with a set of tables or views
often called system catalog or data dictionary. We can access those
views using plain SQL statements.
Example:
select *
from tables

What is inheritance
Generalization
Generalization is the process of extracting common properties from a
set of entities and creating a generalized entity from it. It is a bottom-
up approach in which two or more entities can be generalized to a
higher-level entity if they have some attributes in common. For
Example, STUDENT and FACULTY can be generalized to a higher-level
entity called PERSON as shown in Figure 1. In this case, common
attributes like P_NAME, and P_ADD become part of a
higher entity (PERSON), and specialized attributes like S_FEE
become part of a specialized entity (STUDENT).
Generalization is also called as ‘ Bottom-up approach”.
Specialization
In specialization, an entity is divided into sub-entities based on its
characteristics. It is a top-down approach where the higher-level entity
is specialized into two or more lower-level entities. For Example, an
EMPLOYEE entity in an Employee management system can be
specialized into DEVELOPER, TESTER, etc. as shown in Figure 2. In this
case, common attributes like E_NAME, E_SAL, etc. become part of a
higher entity (EMPLOYEE), and specialized attributes like TES_TYPE
become part of a specialized entity (TESTER).
Specialization is also called as ” Top-Down approch”.

Inheritance: It is an important feature of generalization and


specialization
Attribute inheritance : It allows lower level entities to inherit the

attributes of higher level entities and vice versa. In diagram Car entity
is an inheritance of Vehicle entity ,So Car can acquire attributes
of Vehicle. Example:car can acquire Model attribute of Vehicle.
Participation inheritance: Participation inheritance in ER modeling

refers to the inheritance of participation constraints from a higher-


level entity (superclass) to a lower-level entity (subclass). It ensures
that subclasses adhere to the same participation rules in relationships,
although attributes and relationships themselves are inherited
differently. In diagram Vehicle entity has an relationship with Cycle
entity, but it would not automatically acquire the relationship itself
with the Vehicle entity. Participation inheritance only refers to the
inheritance of participation constraints, not the actual relationships
between entities.
write the high level conceptual model
1. Conceptual Data Model
The conceptual data model describes the database at a very high level
and is useful to understand the needs or requirements of the
database. It is this model, that is used in the requirement-gathering
process i.e. before the Database Designers start making a particular
database. One such popular model is the entity/relationship model
(ER model). The E/R model specializes in entities, relationships, and
even attributes that are used by database designers. In terms of this
concept, a discussion can be made even with non-computer
science(non-technical) users and stakeholders, and their requirements
can be understood.
Entity-Relationship Model( ER Model): It is a high-level data
model which is used to define the data and the relationships between
them. It is basically a conceptual design of any database which is easy
to design the view of data.
Components of ER Model:
1.Entity: An entity is referred to as a real-world object. It can be a

name, place, object, class, etc. These are represented by a rectangle


in an ER Diagram.
2.Attributes: An attribute can be defined as the description of the

entity. These are represented by Ellipse in an ER Diagram. It can be


Age, Roll Number, or Marks for a Student.
3.Relationship: Relationships are used to define relations among

different entities. Diamonds and Rhombus are used to show


Relationships.
Characteristics of a conceptual data model
Offers Organization-wide coverage of the business concepts.
This type of Data Models are designed and developed for a business
audience.
The conceptual model is developed independently of hardware
specifications like data storage capacity, location or software
specifications like DBMS vendor and technology. The focus is to
represent data as a user will see it in the “real world.”
Conceptual data models known as Domain models create a common
vocabulary for all stakeholders by establishing basic concepts and
scope

What is cardinality write definition only


Cardinality in a database management system (DBMS) is the number
of unique values in a table column relative to the total number of rows
in the table.

What is keys and wirte the keys types


Keys are one of the basic requirements of a relational database model.
It is widely used to identify the tuples(rows) uniquely in the table. We
also use keys to set up relations amongst various columns and tables
of a relational database.

Different Types of Database Keys


Candidate Key
Primary Key
Super Key
Alternate Key
Foreign Key
Composite Key

Candidate Key
The minimal set of attributes that can uniquely identify a tuple is
known as a candidate key. For Example, STUD_NO in STUDENT
relation.
It is a minimal super key.
It is a super key with no repeated data is called a candidate key.
The minimal set of attributes that can uniquely identify a record.
It must contain unique values.
It can contain NULL values.
Every table must have at least a single candidate key.
A table can have multiple candidate keys but only one primary key.
The value of the Candidate Key is unique and may be null for a tuple.
There can be more than one candidate key in a relationship.
Example:
STUD_NO is the candidate key for relation STUDENT.
Table STUDENT
SNA ADDRE
STUD_NO PHONE
ME SS

1234567
1 Shyam Delhi
89

2233657
2 Rakesh Kolkata
96

1754689
3 Suraj Delhi
65

The candidate key can be simple (having only one attribute) or


composite as well
{STUD_NO, COURSE_NO} is a composite
candidate key for relation STUDENT_COURSE.
Table STUDENT_COURSE
TEACHER_N COURSE_N
STUD_NO
O O

1 001 C001

2 056 C005

Primary Key
There can be more than one candidate key in relation out of which one
can be chosen as the primary key. For Example, STUD_NO, as well as
STUD_PHONE, are candidate keys for relation STUDENT but STUD_NO
can be chosen as the primary key (only one out of many candidate
keys).
It is a unique key.
It can identify only one tuple (a record) at a time.
It has no duplicate values, it has unique values.
It cannot be NULL.
Primary keys are not necessarily to be a single column; more than
one column can also be a primary key for a table.
Example:
STUDENT table -> Student(STUD_NO, SNAME,
ADDRESS, PHONE) , STUD_NO is a primary key
Table STUDENT
SNA ADDRE
STUD_NO PHONE
ME SS

1234567
1 Shyam Delhi
89

2233657
2 Rakesh Kolkata
96

1754689
3 Suraj Delhi
65

Super Key
The set of attributes that can uniquely identify a tuple is known as
Super Key. For Example, STUD_NO, (STUD_NO, STUD_NAME), etc. A
super key is a group of single or multiple keys that identifies rows in a
table. It supports NULL values.
Adding zero or more attributes to the candidate key generates the
super key.
A candidate key is a super key but vice versa is not true.
Super Key values may also be NULL.
Example:
Consider the table shown above.
STUD_NO+PHONE is a super key.

Alternate Key
The candidate key other than the primary key is called an alternate
key .
All the keys which are not primary keys are called alternate keys.
It is a secondary key.
It contains two or more fields to identify two or more records.
These values are repeated.
Eg:- SNAME, and ADDRESS is Alternate keys
Example:
Consider the table shown above.
STUD_NO, as well as PHONE both,
are candidate keys for relation STUDENT but
PHONE will be an alternate key
(only one out of many candidate keys).

Foreign Key
If an attribute can only take the values which are present as values of
some other attribute, it will be a foreign key to the attribute to which
it refers. The relation which is being referenced is called referenced
relation and the corresponding attribute is called referenced attribute.
The referenced attribute of the referenced relation should be the
primary key to it.
It is a key it acts as a primary key in one table and it acts as
secondary key in another table.
It combines two or more relations (tables) at a time.
They act as a cross-reference between the tables.
For example, DNO is a primary key in the DEPT table and a non-key in
EMP
Example:
Refer Table STUDENT shown above.
STUD_NO in STUDENT_COURSE is a
foreign key to STUD_NO in STUDENT relation.
Table STUDENT_COURSE
TEACHER_N COURSE_N
STUD_NO
O O

1 005 C001

2 056 C005

It may be worth noting that, unlike the Primary Key of any given
relation, Foreign Key can be NULL as well as may contain duplicate
tuples i.e. it need not follow uniqueness constraint. For Example,
STUD_NO in the STUDENT_COURSE relation is not unique. It has been
repeated for the first and third tuples. However, the STUD_NO in
STUDENT relation is a primary key and it needs to be always unique,
and it cannot be null.

Composite Key
Sometimes, a table might not have a single column/attribute that
uniquely identifies all the records of a table. To uniquely identify rows
of a table, a combination of two or more columns/attributes can be
used. It still can give duplicate values in rare cases. So, we need to
find the optimal set of attributes that can uniquely identify rows in a
table.
It acts as a primary key if there is no primary key in a table
Two or more attributes are used together to make a composite key .

Different combinations of attributes may give different accuracy in


terms of identifying the rows uniquely.
Example:
FULLNAME + DOB can be combined
together to access the details of a student.

What is attribute and write the types of


it
Attributes are properties or characteristics of an entity. Attributes are
used to describe the entity. The attribute is nothing but a piece of data
that gives more information about the entity. Attributes are used to
distinguish one entity from the other entity. Attributes help to
categorize the entity and the entity can be easily retrieved and
manipulate the entity. Attributes can help the database to be more
structural and hierarchical. An entity with no attribute is of no use in
the database.

Example
Let's take the student as an entity. Students will have multiple
attributes such as roll number, name, and class.
These attributes are used to describe the student in more detail.
Types Of Attribute
There are 8 types of attributes in DBMS.
Simple Attribute.

Composite Attribute.

Single Valued Attribute.

Multivalued Attribute.

Key Attribute.

Derived Attribute.

Stored Attribute.

Complex Attribute.

Let's look at all attributes one by one.


Simple Attribute
Simple attributes are those attributes that cannot be divided into
more attributes. Simple attributes state the simple information about
the entity such as name, roll_no, class, age, etc.
Simple attributes are widely used for storing information about the
entity.
Example
Here in the below example, Student has roll_no, class, and name as
attributes that cannot be divided into more sub-attributes.
These types of attributes are called simple attributes.
Simple attributes are mainly used to create all other types

of attributes.

Composite Attribute
When 2 or more than 2 simple attributes are combined to make an

attribute then that attribute is called a Composite attribute.


The composite attribute is made up of multiple attributes. After
combining these attributes, the composed attributes are formed.
Complex attributes are used where data is complex and needs to be
stored in a complex structure.
Example
Here if we look at the below example, address is the attribute derived
from the 3 simple attributes i.e. City, State, and Street.
To get the value of the address attribute, we have first to know those
city, state, and street attributes.
This type of attribute is known as a composite attribute.
Single Valued Attribute
The attribute with only a single value is known as a single-valued

attribute. These attributes have a single value for each instance of a


given entity.
Mostly these attributes are used to provide the unique identity to the
multiple instances of attributes.
Example
In the given example, we know that the DOB attribute will have only
one value. So we can say that the DOB attribute is nothing but a single
Valed attribute and it cannot have multiple attributes.
Here roll_no and name will also have mostly one value only.
We can say that all 3 attributes of the student are single-valued.

Multivalued Attribute
An attribute which can have multiple values is known as

a multivalued attribute. Multivalued attributes have multiple values


for the single instance of an entity.
Keu of entity is associated with multiple values. It does not have only
one value. It is the opposite of the single-valued attribute.
Example
Here the student has an attribute named phone_no. One student can
have multiple phone_no, so we can say that phone_no can have
multiple values.
These types of attributes are known as multi-valued attributes.

Multi-valued attributes are used when more than 1 entries for one
attribute need to be stored in the Database.

Key Attribute
The attribute which has unique values for every row in the table is

known as a Key Attribute. The key attribute has a very crucial role in
the database.
The key attribute is a distinct and unique characteristic of the entity
that can be used to identify the entity uniquely.
Example
For students, we can identify every student with roll_no because

each student will have a unique roll_no.


This indicates that roll_no will be a Key attribute for the Student
entity.
All operations on the database can be performed only using Key
Attributes

Derived Attribute
The attribute that can be derived from the other attributes and does

not require to be already present in the database is called a Derived


Attribute.
Derived attributes are not stored in the Database directly. It is
calculated by using the stored attributes in the database.
Example
Here the student has multiple attributes including DOB and age. It is
observed that age can be calculated with the help of the DOB
attribute.
So age is a derived attribute that is derived from an attribute named
DOB.
Stored Attribute
If the data of the attribute remains constant for every instance of

entity then it is called a Stored Attribute.


The value of the attribute present in the database does not get
updated and it remains constant once it is stored.
These attributes are used to store permanent information about an
entity which will remain constant throughout the lifetime of the entity.
Example
The student has 3 attributes as shown above. Her name and DOB will
remain the same throughout his/her education. So the student has a
fixed value attribute that will never change in the future.
These attributes are known as stored attributes.
Complex Attribute
When multi-valued and composite attributes together form an

attribute then it is called a Complex attribute.


Complex attributes can have an unlimited number of sub-attributes.
Example
Here for the student, we created an attribute named contact_info
which further decomposed into phone_no + Address.
The address is a composite attribute which is further divided into
simple attributes and phone_no is a multivalued attribute.
This indicates that the contact_info attribute is made from the multi-
valued and composite attribute.
This type of attribute is known as the Complex Attribute.

You might also like