Composite Attributes Composite attributes allow us to divided attributes into subparts (other attributes). composite name address attributes first name middle initial last name street city state postal code component attributes street number street name apartment number Database System Concepts-7th Edition 6.22 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 6.22 ©Silberschatz, Korth and Sudarshan th Edition Composite Attributes ▪ Composite attributes allow us to divided attributes into subparts (other attributes). name address first_name middle_initial last_name street city state postal_code street_number street_name apartment_number composite attributes component attributes
Representing Complex Attributes in ER Diagram instructor D name first_name middle initial last_name address street street number street_name apt_number city state zip phone_number date of birth age() Database System Concepts-7th Edition 6.23 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 6.23 ©Silberschatz, Korth and Sudarshan th Edition Representing Complex Attributes in ER Diagram
Mapping Cardinality Constraints Express the number of entities to which another entity can be associated via a relationship set. Most useful in describing binary relationship sets. For a binary relationship set the mapping cardinality must be one of the following types: ·One to one 。 One to many ·Many to one ·Many to many Database System Concepts-7th Edition 6.24 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 6.24 ©Silberschatz, Korth and Sudarshan th Edition Mapping Cardinality Constraints ▪ Express the number of entities to which another entity can be associated via a relationship set. ▪ Most useful in describing binary relationship sets. ▪ For a binary relationship set the mapping cardinality must be one of the following types: • One to one • One to many • Many to one • Many to many
Mapping Cardinalities A B A B b b2 03 (a) (b) One to one One to many Note:Some elements in A and B may not be mapped to any elements in the other set Database System Concepts-7th Edition 6.25 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 6.25 ©Silberschatz, Korth and Sudarshan th Edition 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 A B A B a a a 01 03 b, as (a) (b) Many to one Many to many Note:Some elements in A and B may not be mapped to any elements in the other set Database System Concepts-7th Edition 6.26 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 6.26 ©Silberschatz, Korth and Sudarshan th Edition 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