Date post: | 15-Apr-2016 |
Category: |
Documents |
Upload: | saadia-latif |
View: | 220 times |
Download: | 0 times |
Relationships
Relationships are the connections and interactions between the entities instances, e.g., Program and Student ETs are linked
How to identify relationships
Naming Relationships
Up to you If there is no proper name of the association in the
system then participants’ names of abbreviations are used
Relationships
Relationship type can be identified like an entity type
A relationship type is an abstraction of a relationship
Relationships
Entities involved in a relationship are called its participants
Types of the relationships can be established on the basis of participant ETs
Binary Relationships May also have instances, that can be formally described
in an ordered pair form {(S1001, OS), (S1020, DS), (S1002, DS), (S1058, NW)}
Attributes of the Rships
The key The relationships can have their descriptive
attributes Where to place
Ternary Relationships
Instances in ordered triples Example {(S1013, MCS4, Adnan), (S1023, MCS3,
Fasih)}
Unary Relationship An ET linked with itself, also called recursive
relationship Example Roommate, where STUDENT is linked
with STUDENT
Cardinality of Rships
Number of instances of one entity type that can possibly be related to instances of other entity type
Types of Cardinalities
DEPT ChairPerson
One to one
EMPDEPTOne to many/ many to one
PROJEMP
PROJEMP
Many to many
Minimum Cardinality
Determines whether the link is compulsory or optional
Important, since it effects the implementation
Roles in Relationships Determine the role ETs play in a relationship Most of the time is clear from the context, like in
STD and COURSE relationship
Roles in Relationships
Two situation when they should be expressed explicitly
A one to one relationship Two ETs having more than one relationship
EE-R Data ModelDifferent proposalsMost common feature is representation of supertypes and subtypes
A popular feature of Object Oriented paradigm
Super/Subtypes Also called generalization/ specialization Supertype is called a General Entity type whereas
subtypes are the specializations