ER model--Database Modeling The ER data mode was developed to facilitate database design by allowing specification of an enterprise schema that represents the overall logical structure of a database. The ER model is very useful in mapping the meanings and interactions of real-world enterprises onto a conceptual schema. Because of this usefulness,many database-design tools draw on concepts from the ER model. The ER data model employs three basic concepts: entity sets, relationship sets, attributes. The ER model also has an associated diagrammatic representation,the ER diagram,which can express the overall logical structure of a database graphically. Database System Concepts 7.7 @Silberschatz,Korth and Sudarshan
Database System Concepts 7.7 ©Silberschatz, Korth and Sudarshan ER model -- Database Modeling The ER data mode was developed to facilitate database design by allowing specification of an enterprise schema that represents the overall logical structure of a database. The ER model is very useful in mapping the meanings and interactions of real-world enterprises onto a conceptual schema. Because of this usefulness, many database-design tools draw on concepts from the ER model. The ER data model employs three basic concepts: entity sets, relationship sets, attributes. The ER model also has an associated diagrammatic representation, the ER diagram, which can express the overall logical structure of a database graphically
Entity Sets An entity is an object that exists and is distinguishable from other objects. Example:specific person,company,event,plant An entity set is a set of entities of the same type that share the same properties. Example:set of all persons,companies,trees,holidays An entity is represented by a set of attributes;i.e.,descriptive properties possessed by all members of an entity set. Example: instructor =(ID,name,street,city,salary course=(course_id,title,credits) A subset of the attributes form a primary key of the entity set;i.e.,uniquely identifiying each member of the set. Database System Concepts 7.8 @Silberschatz,Korth and Sudarshan
Database System Concepts 7.8 ©Silberschatz, Korth and Sudarshan Entity Sets An entity is an object that exists and is distinguishable from other objects. Example: specific person, company, event, plant An entity set is a set of entities of the same type that share the same properties. Example: set of all persons, companies, trees, holidays An entity is represented by a set of attributes; i.e., descriptive properties possessed by all members of an entity set. Example: instructor = (ID, name, street, city, salary ) course= (course_id, title, credits) A subset of the attributes form a primary key of the entity set; i.e., uniquely identifiying each member of the set
Entity Sets--instructor and student instructor ID instructor name student-ID student name 76766 Crick 98988 Tanaka 45565 Katz 12345 Shankar 10101 Srinivasan 00128 Zhang 98345 Kim 76543 Brown 76543 Singh 76653 Aoi 22222 Einstein 23121 Chavez instructor 44553 Peltier student Database System Concepts 7.9 @Silberschatz,Korth and Sudarshan
Database System Concepts 7.9 ©Silberschatz, Korth and Sudarshan Entity Sets -- instructor and student instructor_ID instructor_name student-ID student_name
Relationship Sets A relationship is an association among several entities Example: 44553(Peltier) advisor 22222(Einstein) student entity relationship set instructor entity A relationship set is a mathematical relation among n >2 entities,each taken from entity sets {(e1,e2,…en)le1∈E1,e2∈E2,,en∈En} where (e1,e2,...e)is a relationship Example: (44553,22222)∈advisor Database System Concepts 7.10 @Silberschatz,Korth and Sudarshan
Database System Concepts 7.10 ©Silberschatz, Korth and Sudarshan Relationship Sets A relationship is an association among several entities Example: 44553 (Peltier) advisor 22222 (Einstein) student entity relationship set instructor entity A relationship set is a mathematical relation among n 2 entities, each taken from entity sets {(e1 , e2 , … en ) | e1 E1 , e2 E2 , …, en En } where (e1 , e2 , …, en ) is a relationship Example: (44553,22222) advisor
Relationship Set advisor 76766 Crick 98988 Tanaka 45565 Katz 12345 Shankar 10101 Srinivasan 00128 Zhang 98345 Kim 76543 Brown 76543 Singh 76653 Aoi 22222 Einstein 23121 Chavez instructor 44553 Peltier student Database System Concepts 7.11 ©Silberscha乜,Korth and Sudarshan
Database System Concepts 7.11 ©Silberschatz, Korth and Sudarshan Relationship Set advisor