Mapping Cardinalities A B A Bbbbb乌 One to one One to many Note: Some elements in A and B may not be mapped to any elements in the other set
Mapping Cardinalities One to one One to many Note: Some elements in A and B may not be mapped to any elements in the other set
Mapping Cardinalities B b3 Many to one Many to many Note: Some elements in A and B may not be mapped to any elements in the other set
Mapping Cardinalities Many to one Many to many Note: Some elements in A and B may not be mapped to any elements in the other set
Complex Attributes Attribute types: Simple and composite attributes Single-valued and multivalued attributes Example: multivalued attribute: phone_ numbers · Derived attributes Can be computed from other attributes Example: age, given date of birth >Domain - the set of permitted values for each attribute
Complex Attributes ➢Attribute types: • Simple and composite attributes. • Single-valued and multivalued attributes • Example: multivalued attribute: phone_ numbers • Derived attributes • Can be computed from other attributes • Example: age, given date_ of_ birth ➢Domain – the set of permitted values for each attribute
Composite Attributes composite name address attributes first_ name middle_ initial last_ name street city state postal_code component attributes street_number street_ name apartment_ number
Composite Attributes
Redundant Attributes Suppose we have entity sets: nstructor, with attributes: ID, name, dept name, salary department, with attributes: dept name, building, budget >We model the fact that each instructor has an associated department using a relationship set inst dept > The attribute dept name appears in both entity sets Since it is the primary key for the entity set department t replicates information present in the relationship and is therefore redundant in the entity set instructor and needs to be removed
Redundant Attributes ➢Suppose we have entity sets: • instructor, with attributes: ID, name, deptname, salary • department, with attributes: deptname, building, budget. ➢We model the fact that each instructor has an associated department using a relationship set instdept. ➢The attribute deptname appears in both entity sets. Since it is the primary key for the entity set department, it replicates information present in the relationship and is therefore redundant in the entity set instructor and needs to be removed