Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.

Slides:



Advertisements
Similar presentations
Chapter 6: Entity-Relationship Model
Advertisements

Weak Entity Sets An entity set that does not have a primary key is referred to as a weak entity set. The existence of a weak entity set depends on the.
Text-Book Chapters (7 and 8) Entity-Relationship Model
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Database Design and the E-R Model Chapter 7 [1 of 2]
CS157A Lecture 3 ER Diagram Prof. Sin-Min Lee Department of Computer Science San Jose State University.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Chapter 2: Entity-Relationship Model (Continued)
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com The following slides are.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Reduction of an E-R Schema to Tables A database which conforms to an E-R diagram can be represented.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 6: Entity-Relationship.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Wat gaan wij leren? Data Bases Data modelleren  Hoe kan ik zien wat voor informatiesysteem.
Chapter 7: Entity-Relationship Model
the Entity-Relationship Model
ICOM 5016 – Introduction to Database Systems Lecture 4 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Database System Concepts, 5th Ed. Chapter 6: Entity-Relationship Model.
Entity-Relationship Model
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 6: Entity-Relationship.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Chapter 7 Database Design and The E–R Model. 2 Goals n Facilitate DB design and represent the overall logical structure of the DB. n Definition Entities.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 6: Entity-Relationship.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 6: Entity-Relationship.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan Chapter 6: Entity-Relationship Model.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts DB Schema Design: the Entity-Relationship Model What’s the use of the E-R model? Entity Sets.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com ICOM 5016 – Introduction.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model ([S] Chp. 6) Entity Sets Relationship Sets Design Issues.
ICOM 5016 – Introduction to Database Systems Lecture 9 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Entity Relationship Diagram (2)
DATABASE MANAGEMENT SYSTEM Entity-Relationship Model.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan Lecture-03 Introduction –Data Models Lectured by, Jesmin Akhter.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
ICOM 5016 – Introduction to Database Systems Lecture 5 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 6: Entity-Relationship.
Computing & Information Sciences Kansas State University Friday, 26 Sep 2008CIS 560: Database System Concepts Lecture 13 of 42 Friday, 26 September 2008.
Modeling A database can be modeled as: a collection of entities, relationship among entities. An entity is an object that exists and is distinguishable.
Chapter 6: Entity-Relationship Model. 6.2 Chapter 6: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity.
Database and Information Retrieval System
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 6: Entity-Relationship.
CST203-2 Database Management Systems Lecture 4. Student entity NIDFNameLNameRegNoExamIdBirthdate.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
CS157A Lecture 4 ER Model 2 Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Module 8: Entity-Relationship.
Chapter 2: Entity-Relationship Model. 3.2 Chapter 2: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
Chapter 7: Entity-Relationship Model
Lecture 26 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Database System Concepts, 7 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Module 4: Overview of.
Database System Concepts ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 6: Entity-Relationship.
Contents Design Process Modeling Constraints E-R Diagram Design Issues
Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Chapter 7 Entity-Relationship Model
Outline of the ER Model By S.Saha
Chapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Weak Entity Sets An entity set that does not have a primary key is referred to as a weak entity set. The existence of a weak entity set depends on the.
Chapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Presentation transcript:

Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship Model

©Silberschatz, Korth and Sudarshan7.2Database System Concepts - 6 th Edition Chapter 7: 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

©Silberschatz, Korth and Sudarshan7.3Database System Concepts - 6 th Edition Modeling An entity is an object Example: specific person, company Entities have attributes Example: Entity: person Attributes: name, addresse

©Silberschatz, Korth and Sudarshan7.4Database System Concepts - 6 th Edition Entities instructor and student instructor_ID instructor_name student-ID student_name

©Silberschatz, Korth and Sudarshan7.5Database System Concepts - 6 th Edition Relationship Sets A relationship is an association between entities Example: (Peltier) advisor (Einstein) student entityrelationship instructor entity

©Silberschatz, Korth and Sudarshan7.6Database System Concepts - 6 th Edition Relationship advisor

©Silberschatz, Korth and Sudarshan7.7Database System Concepts - 6 th Edition Degree of a Relationship Set binary relationship involve two entity sets (or degree two).

©Silberschatz, Korth and Sudarshan7.8Database System Concepts - 6 th Edition Attributes Example: instructor = (ID, name, street, city, salary ) course= (course_id, title, credits) Attribute types: Simple and composite attributes.

©Silberschatz, Korth and Sudarshan7.9Database System Concepts - 6 th Edition Composite Attributes

©Silberschatz, Korth and Sudarshan7.10Database System Concepts - 6 th Edition Mapping Cardinality Constraints For a binary relationship set the mapping cardinality must be one of the following types: One to one One to many Many to one Many to many

©Silberschatz, Korth and Sudarshan7.11Database System Concepts - 6 th Edition Mapping Cardinalities One to one One to many

©Silberschatz, Korth and Sudarshan7.12Database System Concepts - 6 th Edition Mapping Cardinalities Many to one Many to many

©Silberschatz, Korth and Sudarshan7.13Database System Concepts - 6 th Edition E-R Diagrams

©Silberschatz, Korth and Sudarshan7.14Database System Concepts - 6 th Edition Relationship Sets with Attributes

©Silberschatz, Korth and Sudarshan7.15Database System Concepts - 6 th Edition Cardinality Constraints (  ) : “one,” (—): “many,”

©Silberschatz, Korth and Sudarshan7.16Database System Concepts - 6 th Edition One-to-One Relationship one-to-one relationship between an instructor and a student

©Silberschatz, Korth and Sudarshan7.17Database System Concepts - 6 th Edition One-to-Many Relationship one-to-many relationship between an instructor and a student

©Silberschatz, Korth and Sudarshan7.18Database System Concepts - 6 th Edition Many-to-One Relationships In a many-to-one relationship between an instructor and a student,

©Silberschatz, Korth and Sudarshan7.19Database System Concepts - 6 th Edition Many-to-Many Relationship

Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com How about doing an ER design interactively on the board? Suggest an application to be modeled.

©Silberschatz, Korth and Sudarshan7.21Database System Concepts - 6 th Edition Weak Entity Sets An entity set that does not have a primary key is referred to as a weak entity set. The existence of a weak entity set depends on the existence of a identifying entity set It must relate to the identifying entity set via a total, one-to-many relationship set from the identifying to the weak entity set Identifying relationship depicted using a double diamond The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set. The primary key of a weak entity set is formed by the primary key of the strong entity set on which the weak entity set is existence dependent, plus the weak entity set’s discriminator.

©Silberschatz, Korth and Sudarshan7.22Database System Concepts - 6 th Edition Weak Entity Sets (Cont.) We underline the discriminator of a weak entity set with a dashed line. We put the identifying relationship of a weak entity in a double diamond. Primary key for section – (course_id, sec_id, semester, year)

©Silberschatz, Korth and Sudarshan7.23Database System Concepts - 6 th Edition Weak Entity Sets (Cont.) Note: the primary key of the strong entity set is not explicitly stored with the weak entity set, since it is implicit in the identifying relationship. If course_id were explicitly stored, section could be made a strong entity, but then the relationship between section and course would be duplicated by an implicit relationship defined by the attribute course_id common to course and section

©Silberschatz, Korth and Sudarshan7.24Database System Concepts - 6 th Edition Extended ER Features

©Silberschatz, Korth and Sudarshan7.25Database System Concepts - 6 th Edition Extended E-R Features: Specialization Top-down design process; A triangle component labeled ISA (E.g., instructor “is a” person). Attribute inheritance

©Silberschatz, Korth and Sudarshan7.26Database System Concepts - 6 th Edition Specialization Example

©Silberschatz, Korth and Sudarshan7.27Database System Concepts - 6 th Edition Extended ER Features: Generalization A bottom-up design process Specialization and generalization are represented in an E-R diagram in the same way.

Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com End of Chapter 7