0% found this document useful (0 votes)
8 views23 pages

RDBMS5

Uploaded by

nmmanipurnews
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views23 pages

RDBMS5

Uploaded by

nmmanipurnews
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Populated Database

EMPLOYEE FNAME MINI LNAME SSN BDATE ADDRESS SEX SALARY SUPERS DNO WORKS_ON ESSN PNO HOURS
T SN
1234567 1 12.5
JOHN 9 SMITH 123456 1965-01- 731, HOUSTON, TX M 30000 332147 5
09 6788854 2 23.5
ALICE 7 WONG 325648 1955-02- 3321 CASTLE,TX F 40000 845975 4 4576543 3 12.0
03

JAMES K BONG 587946 1962-08- 450, HOUNSTONE,TX M 35000 564782 3


12 DEPT_LOCATIONS DNUMBER DLOCATION

1 HOUSTON
DEPARTMENT DNAME DNUMBER MGRSSN MGRSTARTDATE

4 STAFFORD
RESEARCH 4 7866555 1988-05-02
5 BELLAIRE
PHYSICS 5 4577889 1995-01-01
MATHS 1 6789900 1981-06-19
PROJECT PNAME PNUMBER PLOCATION DNUM
PRODUCTX 1 BELLAIRE 5
PRODUCTY 2 HOUSTON 4
PRODUCTZ 3 STAFFORD 1

DEPENDENT ESSN DEPENDENT_NA SEX BDATE RELATIONSHIP


ME
33535666 ALICE F 2000-03-21 DAUGHTER

8764432 BOB M 2021-05-30 SON

875432 TOM M 2023-06-12 SON


Concept of Relationship in ER diagram
I. Relationship
It is an association among 2 or more entities.
eg., teacher teaches student.
here the relationship is teaches.
II. Degrees of Relationship: It denotes the number of entity types that
participate in a relationship.
1. Unary relationship
exists when there is an association with one entity.
• Binary relationship
Exists when there is an association among two entities.

• Ternary relationship
Exists when there is an association among three entities.
III. Relationship Constraints
1. Cardinality Ratio
• maximum number of relationship instances that an entity can
participate in.
• Possible cardinality ratio for binary relationship are 1:1, 1:N, N:1, M:N
2. Participation Constraints
• Specifies whether existence of an entity depends on its being related
to another entity.
• There are two types of participation. Total participation and Partial
participation.
IV. Attributes of Relationship Types
1. Attributes of 1:1 or 1:N relationship types can be migrated to one of
the participating entity types.
• In 1:1 relationship type, attributes can be migrated to either of the entity
types.
• In 1:N or N:1 relationship type, attribute are migrated only to the entity
type on the N- side of the relationship.
2. In M:N relationship type, some attributes can be determined by a
combination of participating entities.
V. Role Names
1. Signifies the role that a particular entity plays in each relationship
instance.
2. Recursive relationship:- Some entity type participates more than
once in a relationship type in different roles.
VI. Alternative Notations for ER Diagrams
1. Associates a pair of integer number (min, max) with each
participation of an entity type in a relationship type, where
0<=min<=max and max>=1
VII. Enhanced ER Model
• Generalization
It is a bottom-up approach where two lower level entities
combine to form a higher level entity.
Specialization
It is a top-down approach when it defines set of subclasses of an entity
type.
Aggregation
• It is an abstraction concept for building composite objects from their
component objects.
• It is the process of combining two or more entities to form a more
meaningful new entity. When the entities do not make sense of their
own, the aggregation process is used.
• A relationship is established and the resulting product is created into
a new entity in order to create aggregation between the entities that
cannot be used for their individual qualities.
Aggregation is a concept used to express a relationship between a relationship set
and an entity set. It is used when we need to express a to express a relationship
between a higher-level entity and a a relationship, effectively treating the
relationship as an entity. Aggregation helps in simplifying complex ER diagrams by
abstracting a relationship into a single entity.
Example:
Entities: Project, Employee
Relationship: ‘works_on’ (which includes details like hours_worked)
Aggregated entity: ‘Assignment’ (which includes ‘Project’, ‘Employee’ and
‘hours_worked’)
In this example, the relationship ‘works_on’ between ‘Project’ and ‘Employee’ is
abstracted into an aggregated entity called ‘Assignment’.
Relational Data Model Terminologies
1. Table or Relations:- Relational model represents data as a collection
of tables. A table is called is called a relation.
2. Tuple:- each row of a table or relation is called a tuple.
3. Attributes: Attributes are the columns of a table that is used to
describe the entity.
4. Domain: A set of atomic values allowed for an attribute.
5. Relation Schema: Describes a relation made up of a relation name R
and a list of attribute A1, A2, A3,…, An.
6. Degree of a relation: Number of attributes in a relation schema.
7. Cardinality: Total number of tuples present in a relation.
8. Relational database schema: It is a set of relation schemas and a set
of integrity constraint
9. Relation state (or relation instance): set of tuples at a given time.

You might also like