ch2-2 - Chapter 2: Entity-Relationship Model ! Entity Sets...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 ©Silberschatz, Korth and Sudarshan 2.1 Database System Concepts Chapter 2: Entity Chapter 2: Entity -Relationship Model Relationship Model ! Entity Sets ! Relationship Sets ! Design Issues ! Mapping Constraints ! Keys ! E-R Diagram ! Extended E-R Features ! Design of an E-R Database Schema ! Reduction of an E-R Schema to Tables ©Silberschatz, Korth and Sudarshan 2.2 Database System Concepts Entity Sets Entity Sets ! 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
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 ©Silberschatz, Korth and Sudarshan 2.3 Database System Concepts Entity Sets Entity Sets customer customer and and loan loan customer-id customer- customer- customer- loan- amount name street city number ©Silberschatz, Korth and Sudarshan 2.4 Database System Concepts Attributes Attributes ! An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set. ! Domain – the set of permitted values for each attribute ! Attribute types: " Simple and composite attributes. " Single-valued and multi-valued attributes # E.g. multivalued attribute: phone-numbers " Derived attributes # Can be computed from other attributes # E.g. age , given date of birth Example: customer = (customer-id, customer-name, customer-street, customer-city) loan = (loan-number, amount)
Background image of page 2
3 ©Silberschatz, Korth and Sudarshan 2.5 Database System Concepts Composite Attributes Composite Attributes ©Silberschatz, Korth and Sudarshan 2.6 Database System Concepts Relationship Sets 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 {( e 1 , e 2 , … e n ) | e 1 E 1 , e 2 E 2 , …, e n E n } where ( e 1 , e 2 , …, e n ) is a relationship " Example: (Hayes, A-102) depositor
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 ©Silberschatz, Korth and Sudarshan 2.7 Database System Concepts Relationship Set Relationship Set borrower borrower ©Silberschatz, Korth and Sudarshan 2.8 Database System Concepts Relationship Sets (Cont.) Relationship Sets (Cont.) ! An attribute can also be property of a relationship set. ! For instance, the depositor relationship set between entity sets customer and account may have the attribute access-date
Background image of page 4
5 ©Silberschatz, Korth and Sudarshan 2.9 Database System Concepts Degree of a Relationship Set Degree of a Relationship Set ! Refers to number of entity sets that participate in a relationship set. ! Relationship sets that involve two entity sets are
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 01/10/2011.

Page1 / 37

ch2-2 - Chapter 2: Entity-Relationship Model ! Entity Sets...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online