--The Entity Relationship Model(1)--1 The Entity Relationship Model.

Slides:



Advertisements
Similar presentations
Entity Relationship Diagrams
Advertisements

Chapter 6: Entity-Relationship Model (part I)
Database Design The process of finding user requirement
Chapter 31 Chapter 3 Data Modeling Using the Entity-Relationship Model.
The Entity-Relationship Model Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY courtesy of Joe Hellerstein for some slides.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
--The Entity Relationship Model(3)--1 Outline  ER model  Overview  Entity types Attributes, keys  Relationship types  Weak entity types  Uses Crows.
Systems Development Life Cycle
Text-Book Chapters (7 and 8) Entity-Relationship Model
Databases Revision.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
--The Entity Relationship Model(2)--1 Reflexive Rela1tionships  An entity may be related to another entity of the same type.  Example: A Customer could.
Modeling Data The Entity Relationship Model (ER) For Database Design.
©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.
--The Entity Relationship Model(4)--1 Outline  ER model  Overview  Entity types Attributes, keys  Relationship types  Weak entity types  uses Integration.
Introduction to Database Review 1. What is a database  Basic Definitions  Database Management System (DBMS): A software package to facilitate the process.
APPENDIX C DESIGNING DATABASES
Yong Choi School of Business CSUB
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Data Modeling Using the Entity-Relationship Model
Data Modeling Using the Entity-Relationship Model
1 Web-Enabled Decision Support Systems Entity-Relationship Modeling Prof. Name Position (123) University Name.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
the Entity-Relationship Model
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Business Process Modeling
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Entity-Relationship Model Ch. 3
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 1 © Akhilesh Bajaj, 2000, 2002, 2003, 2004.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T5: Designing Database Applications Business Driven Technology.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
CS370 Spring 2007 CS 370 Database Systems Lecture 4 Introduction to Database Design.
Entity-Relationship Model Using High-Level Conceptual Data Models for Database Design Entity Types, Sets, Attributes and Keys Relationship Types, Sets,
Entity – Relationship Model (E-R Model)
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
 Entity-relationship models (ERM) Entity-relationship models (ERM)  Simple E-R Diagram Simple E-R Diagram  Weak Entity Weak Entity  Strong Entity.
ITTelkom Entity Relationship Diagram (1) CS2343 Perancangan Basisdata Relasional.
Slide Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
UNIT_2 1 DATABASE MANAGEMENT SYSTEM[DBMS] [Unit: 2] Prepared By Lavlesh Pandit SPCE MCA, Visnagar.
Databases Illuminated Chapter 3 The Entity Relationship Model.
1 The Entity- Relationship Model Instructor: Mohamed Eltabakh
INTRODUCTION TO DATABASE DESIGN. Definitions Database Models: Conceptual, Logical, Physical Conceptual: “big picture” overview of data and relationships.
Data Modeling Yong Choi School of Business CSUB. Part # 2 2 Study Objectives Understand concepts of data modeling and its purpose Learn how relationships.
Data Modeling Using the Entity-Relationship (ER) Data Model.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
Chapter 2: Entity-Relationship Model. 3.2 Chapter 2: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity.
Database -Entity-Relationship Model 2012/03/05.
ENTITY- RELATIONSHIP MODELLING 1 All rights reserved by
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
COP Introduction to Database Structures
Entity-Relationship Model
Entity-Relationship Model
Entity Relationship Model
Entity-Relationship Model
Outline of the ER Model By S.Saha
بسم الله الرحمن الرحيم.
Entity Relationship Diagrams
Entity-Relationship Model
Chapter Entity-Relationship Modeling & Enhanced Entity- Relationship Modeling.
Database Modeling using Entity Relationship Model (E-R Model)
Chapter 7: Entity-Relationship Model
Entity Relation Model Tingting Zhang.
Presentation transcript:

--The Entity Relationship Model(1)--1 The Entity Relationship Model

--The Entity Relationship Model(1)--2 Outline  ER model  Overview  Entity types Attributes, keys  Relationship types  Weak entity types  uses Integration DEFinition for Information Modeling (IDEF1X) notation in Erwin  EER model  Subclasses  Specialization/Generalization  Schema Design  Single DB  View integration in IS

--The Entity Relationship Model(1)--3 Data Modelling Process Mini-world requirements collection and analysis conceptual design physical design database requirements conceptual schema logical schema internal schema data model mapping DBMS- specific DBMS- independent

--The Entity Relationship Model(1)--4 Entity-Relationship Model  This model is used in conceptual design.  Popular in CASE tools, e.g., SSADM, DataArchitect  A database can be modelled as  a collection of entity types, and  relationships among entity types.  Result is an ER Schema or an ER Diagram.

--The Entity Relationship Model(1)--5 MiniWorld Definition: A miniworld is a part of the real world that we are interested in modelling.

--The Entity Relationship Model(1)--6 Entity Definition: An entity is an object that exists and is distinguishable from other objects.  Object, exists, distinguishable  DVD store mini-world example  Physically exist The CUSTOMER Jane Doe. The Xtra-vision STORE. The EMPLOYEE Juan Gonzales.

--The Entity Relationship Model(1)--7 Entity, cont.  Abstract or organisational entities that do not exist physically  The Introduction to Databases COURSE.  The SCHOOL of Computing.  Events  The TUTORIAL on Friday, October 31,  The EXAMINATION on Tuesday December 15, 2007.

--The Entity Relationship Model(1)--8 Attribute Definition: An attribute is a property of an entity.  Feature example: CUSTOMER Name Date of Birth (DOB) example: DVD Copy number Title  CUSTOMER entity examples Name=Jane, DOB=1/1/70 Name=Joe, DOB=5/6/75

9 Entity Type Definition: An entity set is a set of entities of the same type. Definition: An entity type is a description of the attributes that a set of entities has in common.  Entity set: a set of actual entities  Entity type: the ideal description of a kind of entity  Example: A CUSTOMER entity type. A CUSTOMER has a name and a date of birth (DOB). Name=Joe, DOB=5/6/75 Name=Julius, DOB=9/7/55 Name=Jane, DOB=1/1/70 CUSTOMER entities CUSTOMER entity sets Name=Fred, DOB=8/2/64

10 Entity Type, cont.  Focus on attributes of an ideal entity  An entity has a value for every attribute of the entity type  Use a null value to represent the following.  An unknown attribute value A Customer’s Address is unknown.  An inapplicable attribute value A Customer’s Phone number is inapplicable if that person does not own a phone. Name=Jane, CUSTOMER entities unknown date of birth Name=Fred, DOB=8/2/64

11 Distinguishing Entities  How can entities be distinguished from each other?  Assumption: Each entity will have a unique combination of attribute values.  Example, assume the Customer entity type has Name and DOB attributes. There may be several Customers with a Name of ‘Joe’. Also, there may be several Customers with a DOB of 5/6/75. But there can be at most one Customer with the Name ‘Joe’ and a DOB of 5/6/75.  Is there a smaller such set of attributes? Name=Joe, DOB=10/7/49 CUSTOMER entities Name=Fred, DOB=5/6/75 Name=Joe, DOB=5/6/75

--The Entity Relationship Model(1)--12 Keys Definition: A super key of an entity type is a set of one or more attributes whose values uniquely determine each entity.  Assume each Customer has a unique ID. The following are super keys. {Name, DOB, ID}, {Name, ID}, {Name, DOB}, {DOB, ID}, {ID} Definition: A candidate key is a minimal super key.  {Name, DOB} is a candidate key of Customer.  {ID} is a candidate key of Customer. Definition: Generally, there are may be several candidate keys. One of the keys is selected to be the primary key.  {ID} is the primary key of Customer.

--The Entity Relationship Model(1)--13 ER Diagram - Diamond Notation  An entity type is represented with a labelled rectangle.  An attribute is represented with a labelled oval, connected to an entity type with a line. Customer Name DOB

--The Entity Relationship Model(1)--14 Attributes - Diamond Notation  Single valued versus multi-valued  E.g., multiple telephone extensions  Simple attributes versus structured attributes  E.g., an address is composed of a number, a street, a city and a state CustomerExtension Address Street City State Customer

--The Entity Relationship Model(1)--15 Attributes, cont.  Stored versus derived  E.g., an age can be derived from a stored birthdate  Additional constraints - not represented in a diagram  Null versus non-null  Domain constrained E.g., a student number must be exactly 9 decimal digits Customer DOB Age

--The Entity Relationship Model(1)--16 Keys in ER Diagrams  An attribute that is part of the (primary) key is underlined.  E.g., ID uniquely identifies customers  Assume no two customers with the same name live at the same address. Customer Name Address ID Customer Name Address ID

--The Entity Relationship Model(1)--17 Relationship Definition: A relationship is an object that associates entities. Joe Jenkins Jane Doe Finding Nemo copy 1 Babe copy 3 Customer entities DVD entities relationship objects

18 Relationship sets Definition: A relationship set is a specific set of associated objects between entities of the same entity types. {(e 1, e 2,..., e n ) | e 1  E 1  e 2  E 2 ....  e n  E n } where the relationship is (e 1, e 2,..., e n ).  Example is the set {(Joe Jenkins, Eraserhead copy 1), (Joe Jenkins, Babe copy 3)} Joe Jenkins Jane Doe Eraserhead copy 1 Babe copy 3 Customer entities Video Tape entities

--The Entity Relationship Model(1)--19 Relationship types  Definition: A relationship type describes a relationship set.  A relationship type is an ideal form (Plato), a kind, a type.  Example: The Rents relationship type relates the entity type Customer with the entity type DVD, capturing which customers currently rent DVDs.

20 Relationship Types - Diamond Notation  A relationship type is represented with a labelled diamond, and has lines to each of the entity types it relates.  The relationship type could have attributes.  A relationship type does not have key attribute(s) – the key comes from entity types that it relates. Customer Rents DVD Name Customer ID Return Date Location Address

21 DVD Store Database Example  A DVD is an entity type with attributes  DVD Number, Film ID (the key attributes), and Status  A Customer is an entity type with attributes  Customer ID (the key), Name, Address  Rents is a relationship type with attributes  Return Date, Amount Paid CustomerRentsDVD

22 Example, cont.  The entity-relationship diagram for the above example is: Name Customer Rents DVD Name Address Customer ID Return Date Amount PaidStatus DVD Number Film ID Customer Rents Entity TypeAttributeRelationship Type Where: