Académique Documents
Professionnel Documents
Culture Documents
Muddassar Ali
Entity symbols
Relationship symbols
Muddassar Ali
Entities
An entity is an object that exists and is distinguishable from other objects. Example: specific person, company, event, plant etc Entities have attributes An entity set is a set of entities of the same type that share the same properties. Example: set of all persons, companies, trees etc.
Muddassar Ali
Attributes
Attribute - property or characteristic of an entity type Example: COURSE entity has attributes
Classifications of attributes:
Required versus Optional Attributes Simple versus Composite Attribute Single-Valued versus Multi-valued Attribute Stored versus Derived Attributes
Muddassar Ali 5
Required attribute is that which is must for an entity it must not be null. Optional is not necessary for an entity it may be null.
Muddassar Ali
Example: Title for the COURSE entity type Age for EMPLOYEE entity type
A composite attribute
Muddassar Ali
Single Valued attributes have only one value for each entity of an entity set Each attribute Age and/or Sex has single value for each EMPLOYEE entity Example: Single-valued: Gender = M Multi-valued attributes Example: Phone attribute may be multivalued when person has several phones (home, office, mobile)
Muddassar Ali
Muddassar Ali
10
Key Attributes
Key attribute is one or more attributes that uniquely identifies each entity of the entity set Value of key attribute
Identifies each entity uniquely Must be distinct for each entity in the entity set Unique for every extension of the entity type
Muddassar Ali
11
Muddassar Ali
12
Primary Key
Multivalued:
Derived from date employed and current date
Muddassar Ali
Relationships
Degree of Relationships
Degree of a relationship is the number of entity types that participate in it Unary Relationship : 1 entity involved Binary Relationship : 2 entities involved Ternary Relationship : 3 entities involved N-ary Relationship : n-entities involved
Muddassar Ali 16
Degree of relationships
Muddassar Ali
Cardinality of Relationships
One-to-One Each entity in the relationship will have exactly one related entity One-to-Many An entity on one side of the relationship can have many related entities, but an entity on the other side will have a maximum of one related entity Many-to-Many Entities on both sides of the relationship can have many related entities on the other side
Muddassar Ali
18
Cardinality Constraints
Cardinality Constraints - the number of instances of one entity that can or must be associated with each instance of another entity Minimum Cardinality
If zero, then optional If one or more, then mandatory The maximum number
Maximum Cardinality
Muddassar Ali
19
Muddassar Ali
20
Muddassar Ali
21
Muddassar Ali
23
Muddassar Ali
24
Muddassar Ali
25
Muddassar Ali
26
Muddassar Ali
27
Strong entities exist independently of other types of entities has its own unique identifier represented with single-line rectangle Weak entity dependent on a strong entitycannot exist on its own does not have a unique identifier represented with double-line rectangle Identifying relationship links strong entities to weak entities represented with double line diamond
Muddassar Ali 28
Strong entity
Identifying relationship
Muddassar Ali
Weak entity
29
Associative Entities
Associative entity involves a rectangle with a diamond inside. Note that the many-to-many cardinality symbols face toward the associative entity and not toward the other entities
Muddassar Ali 31
Muddassar Ali
32
Customer Submits zero or many Orders but Order must be submitted by one customer. Order Request one or many Products But Product can be Requested by zero or many Orders. Item is Used_In one or many Products And Product Used one or many Items. Supplier supplied zero or many Items but item may be supplied by one or many suppliers. An item is included by zero or many shipments and shipment includes one or many items. one supplier sends zero or many shipments but shipment is send by exactly one supplier.
Muddassar Ali 33
Muddassar Ali
34
THE END
Any Questions???
Muddassar Ali