Conceptual Modeling with ER Diagrams Peter Chen introduced ER Diagrams.

Slides:



Advertisements
Similar presentations
More Diagramming & Practice with Relationship Modeling
Advertisements

1 Database Design I: The Entity- Relationship Model Chapter 5.
Chapter 31 Chapter 3 Data Modeling Using the Entity-Relationship Model.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Systems Development Life Cycle
Chapter 4 Conceptual Modeling of Databases with Entity-Relationship Diagrams and the Unified Modeling Language.
Mapping an ERD to a Relational Database To map an ERD to a relational database, five rules are defined to govern how tables are constructed. 1)Rule for.
Databases Revision.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Entity-Relationship Model and Diagrams (continued)
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
APPENDIX C DESIGNING DATABASES
Mapping ERM to relational database
Chapter 3: The Enhanced E-R Model
CS 405G Introduction to Database Systems
Data Modeling Using the Entity-Relationship Model
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.
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model.
Conceptual Modeling with ER Diagrams Peter Chen introduced ER Diagrams.
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
IS 325 Notes for Wednesday September 4, Syllabus Change I eliminated quizzes I increased the points allocated to homework assignments.
Copyright (c) 2014 Pearson Education, Inc. Introduction to Databases.
ER to Relational Translation COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
Chapter 3: Relational Model I Structure of Relational Databases Structure of Relational Databases Convert a ER Design to a Relational Database Convert.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T5: Designing Database Applications Business Driven Technology.
Implementing an REA Model in a Relational Database
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Slide content original, slide layout from Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
EXAMPLE. Subclasses and Superclasses Entity type may have sub-grouping that need to be represented explicitly. –Example: Employee may grouped into.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 4 Mapping an ER model to tables © Akhilesh Bajaj,
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
1 A Demo of Logical Database Design. 2 Aim of the demo To develop an understanding of the logical view of data and the importance of the relational model.
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
Entity Relationship Diagram (2)
Databases Illuminated Chapter 3 The Entity Relationship Model.
Data Modelling Using Entity-Relationship (ER) Model
Database Systems – ER Diagrams EXAMPLE COMPANY DATABASE Requirements of the Company (oversimplified to illustrate) The company is organized into DEPARTMENTs.
Lecture 03 Entity-Relationship Diagram. Chapter Outline.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
Data Modeling Using the Entity- Relationship (ER) Model.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
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.
1 Information System Analysis Topic-3. 2 Entity Relationship Diagram \ Definition An entity-relationship (ER) diagram is a specialized graphic that illustrates.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 2: MODELING DATA.
Data Modeling AND ER MODELS.
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Data Modeling Using the Entity- Relationship (ER) Model
CS4222 Principles of Database System
Database Design Goal: specification of database schema Methodology:
ER model Ashima Wadhwa.
Entity-Relationship Model
ER MODEL Lecture 3.
Entity-Relationship Modeling "Extended"
Initial Design of Entity Types: EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT Gender.
ERD (Entity Relationship Diagrams)
Conceptual Data Modeling Using Entities & Relationships
Entity Relation Model Tingting Zhang.
Entity-Relationship Modeling "Extended"
Entity-Relationship Modeling "Extended"
Presentation transcript:

Conceptual Modeling with ER Diagrams Peter Chen introduced ER Diagrams

E-R Modeling E-R Modeling is a design methodology for modeling the –Entities –Relationships using a diagram with specified shapes for entities, relationships, roles of entities in these relationships, and cardinality.

E-R Diagram Conventions Symbol Meaning Entity Type Weak Entity Type Relationship Identifying Relationship Attribute

ER-Diagram Conventions - CONTINUED Symbol Meaning Key Attribute Multivalued Attribute Composite Attribute

E-R Modeling – Entity Sets, Attributes, Relationships Racquet Club Example A Racquet Club has members with one year or two year contracts. Members pay contract amount up front, quarterly, or monthly. Members may reserve a court for the next day.

E-R Modeling – Entity Sets, Attributes, Relationships Racquet Club Example Continued Entity Sets –Members : Name, Start, Contract_Amount, Contract_Period, Initial_Balance, Member_ID –Payments : PayerID, Amount, Paid_Date, Payment_ID –Reservations : Member_ID, CourtNumber, Hour Relations : –Member - Makes – Payment –Member - Makes - Reservation

E-R diagrams for several relationship types

Data Modeling – Racquet Club Example

Keys, Cardinality Constraints and Participation Constraints A key of a relation is a minimal set of attributes and roles which uniquely determine each entity. A cardinality constraint m..n constrains the number of times a single entity can participate in a role of a relationship : m <= times <= n. A participation constraint ensures that an entity will particpate at least this many times.

ER-Diagram Cardinality Conventions Symbol Meaning Calculated Attribute Cardinality Constraints and Participation Constraints 0.. * * 1.. 1

Cardinality in the E-R model means that at least 1 d must participate in the A relation with C and that not more that 2 d’s can participate. If A is represented by a table, then there is at least one row and not more than 2 rows with a single c value.

Two ways to represent single- role key constraints. Cardinality 0..1 can be represented by 0..1 or by

Many-to-one, one-to-one, and many-to-many correspondences

Example of an E-R diagram with an I S A hierarchy.

Using IsA for data partitioning. New York CustomerPennsylvania Customer

Participation constraints.

Line-based representation vs. cardinality constraints.

Entities, Relationships and Attributes A entity is a object or event which needs to be tracked. A relationship relates entities in two or more entity sets. Attributes characterize entity sets and relationships. Employee Project Assigned Name Date

Relationship Types – Two Entity Set Relations Project Assigned To Employee Num-Hours Project Will Pay For Fixed-Cost Customer

Relationship Types – One & Three Entity Set Relations One Set : ReportsTo( SupID, SubID ) Three Sets : Sale( ProdID, CustID,SuppID;Date) Employee Reports_To subordinate supervisor Customer Product Supplier Sold Date Price

ER Diagrams for Payroll Payroll System Entity Sets & Relationships Customers : Name, Address,Phone,CustID Projects : Name,Description,ProjID,Total,CustID Employees : Name,SSNo,PayRate,EmpID TimeSheets : TSID,EmpID,Year,Month LaborCharges : TSID,ProjID,Description,Hours,Amount PayrollChecks : TSID,GrossPay,SSDeduction,WithHolding,NetPay CustomerInvoices : InvID,Year,Month,TotalCharge,SalesTax W2Statements : Year,EmpID,GrossPay,SSPayments,Withholding

ER Diagram Customers : Name, Address,Phone,CustID Projects : Name,Description,ProjID,Total,CustID

ER Diagrams for Payroll Customer Name Address Phone CustID Projects Name Description Total CustID ProjID Has

ER Diagram Employees : Name,SSNo,PayRate,EmpID TimeSheets : TSID,EmpID,Year,Month LaborCharges : TSID,ProjID,Description,Hours,Amount PayrollChecks : TSID,GrossPay,SSDeduction,WithHolding,NetPay

ER Diagrams for Payroll Employee Name SSNo PayRate EmpID TimeSheet Year Month EmpID TSID Has PayCheck Has Labor Charges Has TSID... NetPay TSID... Amount

The IS-A Relationship Employee Is-A Salaried Employee Hourly Employee disjoint Name SSNo Salary PayRate

Construct an ER Diagram Lawn Furniture Manufacturer Stores Information for Catalog of products and parts Stores Information for Manufacturing, including quantity on hand Identify product entities (picnic table and lawn chair) with attributes Identify relationships IsA and PartOf

The Part-Of Relationship Picnic_Table Lawn_Chair ProdNo Part_Of OutDoorProducts IsA TopBase Seats Quantity ProdNo Price

From ER Diagrams to Relational Database Schema Translating Entities Employee Name SSNo Type HireDate Termination Create Table Employee ( Name char(20), Type char(1), HireDate date, Termination date, SSNo char(9), Primary Key (SSNo) )

From ER Diagrams to Relational Database Schema Translating Relationships Customer Product Supplier Sold SaleDate Price Create Table Sold ( SaleDate Date, Price Currency, SaleID autonumber, Customer Integer, Supplier Integer, Product Integer, Primary Key (SaleID), Foreign Key ( Customer ) References Customers( CustID), Foreign Key ( Supplier ) References Suppliers( SuppID ), Foreign Key ( Product ) References Products ProdID ) ) SaleID

Translate into Schema Employee Is-A Salaried Employee Hourly Employee disjoint Name SSNo Salary PayRate

Translate Into Schema Picnic_Table Lawn_Chair ProdNo Part_Of OutDoorProducts IsA TopBase Seats Quantity ProdNo Price