Chapter 6:Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity Sets Extended E-R Features Design of the Bank Database Reduction to Relation Schemas Database Design UML Database System Concepts-5th Edition,Oct 5,2006 6.2 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 6.2 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Chapter 6: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity Sets Extended E-R Features Design of the Bank Database Reduction to Relation Schemas Database Design UML
Modeling A database can be modeled as: a collection of entities. relationship among entities. An entity is an object that exists and is distinguishable from other objects. Example:specific person,company,event,plant Entities have attributes Example:people have names and addresses 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 Database System Concepts-5th Edition,Oct 5,2006 6.3 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 6.3 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Modeling A database can be modeled as: a collection of entities, relationship among entities. An entity is an object that exists and is distinguishable from other objects. Example: specific person, company, event, plant Entities have attributes Example: people have names and addresses 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
Entity Sets customer and loan customer id customer customer customer_ loan amount name street city number 321-12-3123 ones Main Harrison L-17 1000 019-28-3746 Smith North Rye L-23 2000 677-89-9011 Hayes Main Harrison L-15 1500 555-55-5555 Jackson Dupont Woodside L-14 1500 244-66-8800 Curry North Rye L-19 500 963-96-3963 Williams Nassau Princeton L-11 900 335-57-7991 Adams Spring Pittsfield L-16 1300 customer loan Database System Concepts-5th Edition,Oct 5,2006 6.4 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 6.4 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Entity Sets customer and loan customer_id customer_ customer_ customer_ loan_ amount name street city number
Relationship Sets A relationship is an association among several entities Example: Hayes depositor A-102 customer entity relationship set account 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: (Hayes,A-102)E depositor Database System Concepts-5th Edition,Oct 5,2006 6.5 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 6.5 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Relationship Sets A relationship is an association among several entities Example: Hayes depositor A-102 customer entity relationship set account 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: (Hayes, A-102) depositor
Relationship Set borrower 321-12-3123 Tones Main Harrison L-17 1000 019-28-3746 Smith North Rye L-23 2000 677-89-9011 Hayes Main Harrison L-15 1500 555-55-5555 Jackson Dupont Woodside L-14 1500 244-66-8800 Curry North Rye L-19 500 963-96-3963 Williams Nassau Princeton L-11 900 335-57-7991 Adams Spring Pittsfield L-16 1300 customer loan Database System Concepts-5th Edition,Oct 5,2006 6.6 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 6.6 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Relationship Set borrower