Download presentation
Presentation is loading. Please wait.
Published bySamuel Holt Modified over 9 years ago
1
Slide content original, slide layout from Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2
2
Slide content original, slide layout from Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke2 Database Design Basics: Six Steps in Design 1. Data Requirements Analysis: a) what must be stored, b) how will it be used, and c) what actions occur most often. 2. Conceptual Database Design: Use ERD(s) to group data into entities and relationships. 3. Logical Database Design: Convert ERD(s) to conceptual schemas. 4. Schema Refinement: Eliminate redundancy and refine tables for performance. 5. Physical Database Design: Decide how to store and index the data. 6. Application and Security Design: Put the DB in the application’s context.
3
Slide content original, slide layout from Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke3 ER Model Basics Employees ssn Works_In Attribute (descriptive attribute), entities (relationships) possess these. Entity. A group of these is an entity set. Relationship ( if “ISA”). A group would be a relationship set. ISA
4
Slide content original, slide layout from Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke4 ER Model Basics (Example) class office phone name declaresMajor Students ssn How do we choose a key? Candidate keys and primary keys
5
Slide content original, slide layout from Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke5 ER Model Basics (Example) class office phone name declaresMajor Students ssn Two types of constraints to consider: key constraints and participation constratints. Key constraints can be one-to-many or many-to-many Participation constraints can be total or partial
6
Slide content original, slide layout from Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke6 ER Model Basics (Example) class office phone name declaresMajor Students ssn Total participation (all) Total participation and key constraint (all and only one) Key constraint (only one)
7
Slide content original, slide layout from Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke7 ER Model: Other Concepts: Weak Entity Sets rank did name sponsorsdependent member ssn These symbols must be “bolded” to denote the weak entity set The link is “bolded” to show total participation. It must also have an arrowhead to show a key constraint.
8
Slide content original, slide layout from Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke8 ER Model: Other Concepts: ISA Relationships gender name employee id isa facultystaffstudent salarycontractwageinsdatewagedate Two constraints of concern with ISA relationships: * Overlap (no by default) * Covering (no by default)
9
Slide content original, slide layout from Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke9 ER Model: Other Concepts: Aggregation phone name addr hiresagent customer name order Prod # buys product name quantity price Could also use a ternary relationship
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.