336_Chapter2

336_Chapter2 - The Entity-Relationship Model Chapter 2...

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

View Full Document Right Arrow Icon
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 The Entity-Relationship Model Chapter 2 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 2 Overview of Database Design Conceptual design : (ER Model is used at this stage.) What are the entities and relationships in the enterprise? What information about these entities and relationships should we store in the database? What are the integrity constraints or business rules that hold? A database `schema’ in the ER Model can be represented pictorially ( ER diagrams ). Can map an ER diagram into a relational schema. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 3 ER Model Basics Entity : Real-world object distinguishable from other objects. An entity is described (in DB) using a set of attributes . Entity Set : A collection of similar entities. E.g., all employees. All entities in an entity set have the same set of attributes. (Until we consider ISA hierarchies, anyway!) Each entity set has a key . Each attribute has a domain . Employees ssn name lot
Background image of page 1

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

View Full DocumentRight Arrow Icon
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 4 ER Model Basics (Contd.) Relationship : Association among two or more entities. E.g., Attishoo works in Pharmacy department. Relationship Set : Collection of similar relationships. An n-ary relationship set R relates n entity sets E1 . .. En; each relationship in R involves entities e1 E1, . .., en En •Same entity set could participate in different relationship sets, or in different “roles” in same set. lot dname budget did since name Works_In Departments Employees ssn Reports_To lot name Employees subor- dinate super- visor ssn Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 5 Key Constraints Consider Works_In: An employee can work in many departments; a dept can have many employees. In contrast, each dept has at most one manager, according to the key constraint on Manages. Many-to-Many 1-to-1 1-to Many Many-to-1 dname budget did since lot name ssn Manages Employees Departments Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 6 Participation Constraints Does every department have a manager?
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/03/2008 for the course CS 336 taught by Professor Zhang during the Spring '08 term at Rutgers.

Page1 / 6

336_Chapter2 - The Entity-Relationship Model Chapter 2...

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

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