Database Management COP4540, SCS, FIU Database Modeling Using the Entity-Relationship Model (Chapter 3)

Slides:



Advertisements
Similar presentations
Chapter 31 Chapter 3 Data Modeling Using the Entity-Relationship Model.
Advertisements

Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
Systems Development Life Cycle
Data Modeling is an Analysis Activity
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
Chapter 3: Modeling Data in the Organization
Lecture Eleven Entity-Relationship Modelling
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Chapter 3: Modeling Data in the Organization
Information Resources Management January 30, 2001.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
APPENDIX C DESIGNING DATABASES
CS 405G Introduction to Database Systems
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Entity-Relationship modeling Transparencies
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 7th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
1 Web-Enabled Decision Support Systems Entity-Relationship Modeling Prof. Name Position (123) University Name.
3.1 CSIS 3310 Chapter 3 The Entity-Relationship Model Conceptual Data Modeling.
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model.
the Entity-Relationship Model
Chapter 3: Modeling Data in the Organization
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Chapter 5 Entity–Relationship Modeling
Chapter 11 (I) CIS458 Sungchul Hong. Chapter 11 - Objectives How to use Entity–Relationship (ER) modelling in database design. Basic concepts associated.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Entity-Relationship Model Ch. 3
Conceptual Data Modeling, Entity Relationship Diagrams
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter.
1 Chapter 11 Entity-Relationship Modeling Transparencies Last Updated: 25 April 2011 By M. Arief
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
CS 3630 Database Design and Implementation. Assignment 1 2 What is 3630?
Chapter 7 Data Modeling with Entity Relationship Diagrams
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
Database Management COP4540, SCS, FIU Database Modeling Using the Entity-Relationship Model (Continued)
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
1 Entity-Relationship Model © Pearson Education Limited 1995, 2005.
Databases Illuminated Chapter 3 The Entity Relationship Model.
Entity Relationship Modeling
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Data Modeling Using the Entity-Relationship (ER) Data Model.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 2: MODELING DATA.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
Chapter 7 Data Modeling Using the Entity-Relationship (ER) Model
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Lecture 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Entity Relationship Model
Chapter -3- Data Modeling Using the Entity-Relationship Model
Overview of Entity‐Relationship Model
Review of Week 1 Database DBMS File systems vs. database systems
Entity-Relationship Diagram (ERD)
ER MODELING Instructor: SAMIA ARSHAD
Presentation transcript:

Database Management COP4540, SCS, FIU Database Modeling Using the Entity-Relationship Model (Chapter 3)

Database Management COP4540, SCS, FIU Entity-Relationship Model E-R model was introduced by Peter Chen in 1976 It is a graphical approach to database modeling. It describes data as entities, relationships and attributes.

Database Management COP4540, SCS, FIU Elements of ER Model Key elements: –Entities –Attributes –Relationships –Identifiers

Database Management COP4540, SCS, FIU Entities An entity is the basic object that the E-R model represents An entity is something that can be identified in real world. Examples –Peter Johns, MIS, –May Carson, CS, –Dee Conway, 1134, CS, Prof. Entities of a given type are grouped into entity classes.

Database Management COP4540, SCS, FIU Entities (2) STUDENT FACULTY Entity Class Entity Instances

Database Management COP4540, SCS, FIU Attributes Entities have attributes that describe the entity’s characteristics. Types of attributes: single-valued, multi- valued, composite. Example are: Single-value: “Year 2” Multi-valued: {MIS, Marketing} Composite: (FirstName, LastName)

Database Management COP4540, SCS, FIU Relationships A relationship indicated how one or more entity classes interact with one and another. Each entity plays a role in a relationship. Degree of the relationship: number of entities in a relationship. Understanding the relationship is important because it will affect how the database is constructed and used.

Database Management COP4540, SCS, FIU E-R Concepts entity type = entity class = entity entity instance = entity occurrence = record entity type: a set of objects in the real world with the same properties (not the same values) with a physical or conceptual existence entity instance: each entity has its own values for each attribute

Database Management COP4540, SCS, FIU Basic E-R Notation Entity Weak Entity Relationship Identifying Relationship Attribute Multivalued Attribute Derived Attribute

Database Management COP4540, SCS, FIU Basic E-R Notation Relationship degree UnaryBinaryTernary

Database Management COP4540, SCS, FIU E-R Model Constructs Strong versus Weak Entity Type –Independent versus dependent entity –Identifying owner –Identifying relationship –Weak entity identifier is its partial identifier combined with that of its owner.

Database Management COP4540, SCS, FIU E-R Model Constructs Attribute - property or characteristic of an entity type Simple versus Composite Attribute Single-valued versus Multivalued Attribute Stored versus Derived Attributes.

Database Management COP4540, SCS, FIU Composite Attribute Address StreetCityStateZip

Database Management COP4540, SCS, FIU Entity with multivalued attribute (Skills) and derived attribute (Years_Employed) EMPLOYEE Employee_ID Name Address Skills Date_Employed Years_Employed

Database Management COP4540, SCS, FIU Simple and composite Key attributes (a) Simple key attribute STUDENT SSN Student_NameOther_Attributes

Database Management COP4540, SCS, FIU Simple and composite Key attributes (a) Composite key attribute FLIGHT Flight_ID Flight_No Date Number_of_Passengers

Database Management COP4540, SCS, FIU Stored vs Derived Attributes Derived attribute: the value of an attribute is derived from something else STUDENT Name SSN FName LName Tel DOB Age

Database Management COP4540, SCS, FIU Derived Attributes Example 1: Age = today date - DOB Example 2: total number of staff can be calculated by counting the total number of staff entity instances. Example 3: deposit = 2 * rent

Database Management COP4540, SCS, FIU How to Interpret this Model BRANCH Branch_No Tel_No Address Street City ZipCode Fax_No Total_ Branch

Database Management COP4540, SCS, FIU E-R Model Constructs Identifier or Key - An attribute (or combination of attributes) that uniquely identifies individual instances of an entity type. Simple Key versus Composite Key Candidate Key

Database Management COP4540, SCS, FIU E-R Model Constructs Criteria for selecting Identifiers –Will not change value –Will not be null –No intelligent identifiers (containing e.g. locations or people that might change) –Substitute new, simple keys for long, composite key.

Database Management COP4540, SCS, FIU Relationships Definition: a meaningful association among entity classes. “Meaningful” implies that the relationship allows us to answer questions that could not be answered given only the entity classes. In general, any number of entity classes may participate in a relationship.

Database Management COP4540, SCS, FIU Relationships Relationship type versus Instance Degree of Relationship - number of entity types that participate in it A relationship is represented by a diamond in the diagram with lines linking to the corresponding entity classes. Professors name teaching Courses CourseId

Database Management COP4540, SCS, FIU Relationship Set Think of the value of relationship set as a table –One column for each of the connected entity sets. –One row for each list of entities, one from each set, which is connected by the relationship.

Database Management COP4540, SCS, FIU Relationships Degree of Relationship –Unary Relationship –Binary Relationship –Ternary Relationship Attributes of Relationship –Many to Many

Database Management COP4540, SCS, FIU Relationships of different degrees (a) Unary relationships One-to-one PERSON Is_married_to 1 1 EMPLOYEEManages N 1 One-to-many

Database Management COP4540, SCS, FIU Role Names Unary relationship: the same entity class participates more than once in different roles. EMP Supervises Supervisee Supervisor 1 N

Database Management COP4540, SCS, FIU (b) Binary relationships EMPLOYEE PARKING PLACE Assigned 11 One-to-one PRODUCT LINE PRODUCT Contains 1N One-to-many STUDENT COURSE Registers MN Many-to-many

Database Management COP4540, SCS, FIU Role Names Role names may also be used when two entity classes are associated through more than one relationships EMP DEPT Works_in Manages manager member of staff N 1 11

Database Management COP4540, SCS, FIU Multiway relationship Usually binary relationships (connecting two E.S.) suffice. – However, there are some cases where three or more E.S. must be connected by one relationship. – Example: relationship among students, courses, TA's. StudentsCourses TAs taking assisting M N N 1

Database Management COP4540, SCS, FIU Multiway relationship –What if students are divided into sections, each headed by a TA? A student would be related to only one of the TA's for the course. Which one? – Need a 3-way relationship to tell. Students Courses TAs Enrolls 1 M N

Database Management COP4540, SCS, FIU Attributes on Relationships Bars Beers sells price Because the price jointly depends on beer and bar, it is actually a shorthand for 3-way relationship Bars Beers sells price Prices

Database Management COP4540, SCS, FIU Converting multiway to 2-way Any relationship with more than two E.S. can be converted to a collection binary many-to-one relationships without losing any information. Steps: –Create a new connecting entity set. –Introduce many-to-one relationships from the connecting entity set to each of the entity sets (or roles) involved.

Database Management COP4540, SCS, FIU BarsBeers The Price price Prices The Bar The Beer BBP N 1 N N 1 1

Database Management COP4540, SCS, FIU 4-nary Relationship SOLICITOR BUYER FINANCIAL_ INSTITUTION BID Arranges A buyer, advised by a solicitor, and supported by a financial institution, places a bid for a property. A simultaneous relationship among four instances.