Data Modeling with ERD BUS 782. Entities An entity is a person, place, object, event, or concept in the user environment about which the organization.

Slides:



Advertisements
Similar presentations
Entity Relationship Diagrams
Advertisements

Database Design The process of finding user requirement
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Enhanced Entity-Relationship Modeling. Strong and Weak Entity Types Strong entity: Each object is uniquely identifiable using primary key of that entity.
Normalization ISYS 464. Database Design Based on ERD Strong entity: Create a table that includes all simple attributes –Composite Weak entity: add owner.
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
Data Modeling and Relational Database Design ISYS 650.
Database Design & Mapping
Introduction to Database ISYS 363. File Concepts File consists of a group of records. Each record contains a group of fields. Example: Student file –SIDSnameMajorSexGPA.
Entity Relationship Diagrams Basic Elements and Rules.
Data Modeling ISYS 464. Install Oracle 10g Express Website to download: – –Choose Linux.
Introduction to Relational Database ISYS 464. Introduction to Relational Model Data is logically structured within relations. Each relation is a table.
Data Modeling with ERD ISYS 363. Entity-Relationship Diagram An entity is a “thing” in the real world, such as a person, place, event for which we intend.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Introduction to Database ISYS 363. File Concepts File consists of a group of records. Each record contains a group of fields. Example: Student file –SIDSnameMajorSexGPA.
Ch5: Software Specification. 1 Descriptive specifications  Describe desired properties of system  Three types:
Introduction to Database. File Formats Comma delimited file –"s1","peter",3 –"s2","paul",2.5 –"s3","mary",3.5 –Demo: Excel – Data/Import Extended Markup.
Data Modeling ISYS 464. Database Design Process Conceptual database design: –The process of creating a data model independent of implementation details.
Data Modeling ISYS 464. Database Design Process Conceptual database design: –The process of creating a data model independent of implementation details.
Entity Relationship Diagrams
Enhanced Entity-Relationship Modeling
Lesson-19 Data Modeling and Analysis
Database – Part 2a Dr. V.T. Raja Oregon State University.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Database Management COP4540, SCS, FIU Database Modeling Using the Entity-Relationship Model (Chapter 3)
Modern Systems Analysis and Design Third Edition
APPENDIX C DESIGNING DATABASES
Data Modeling 1 Yong Choi School of Business CSUB.
Entity Relationship Modeling Objectives: To illustrate how relationships between entities are defined and refined. To know how relationships are incorporated.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
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. 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.
CHAPTER 2. FUNDAMENTAL OF ENTITY RELATIONSHIP (ER)
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 6 Structuring.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Entity-Relationship Model Ch. 3
CSC 240 (Blum)1 Introduction to Database. CSC 240 (Blum)2 Data versus Information When people distinguish between data and information, –Data is simply.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
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.
Data Modeling ISYS 464.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Data Modeling Using the Entity-Relationship (ER) Model.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
Data Modeling Using the Entity-Relationship (ER) Data Model.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
Lesson 4: The Relational Model. Lesson Overview Database Design Entities Relationships E-R Diagrams.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Lecture 91 Introduction to Data Analysis and Logic Specification Objectives l Draw an entity-relationship diagram, and explain the types of entity relationships.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Howard Paul. Sequential Access Index Files and Data File Random Access.
1 ASPP(DATABASE DESIGN) Database Design. 2 ASPP(DATABASE DESIGN) Objectives àDefine the terms entity, record, and attribute and discuss the various types.
Data Modeling with ERD ISYS 363.
ERD :: 19 / 1 / Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram –A.
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
Topic 3: ER – Entity Relationship Model (ERM) 6/12/
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Entity-Relationship Model
Data Modeling ISYS 464.
Introduction to Database
Introduction to Database
Querying Database ISYS 363.
Chapter 7: Entity-Relationship Model
Introduction to Database
Entity Relationship Model
Presentation transcript:

Data Modeling with ERD BUS 782

Entities An entity is a person, place, object, event, or concept in the user environment about which the organization wishes to maintain data. –Person: Employee, Student, patient –Place: Warehouse, Store –Object: Product, Machine. –Event: Registration, Sale, Renewal –Concept: Account, Course Physical existence: Customer, student, product, etc. Conceptual existence: Bank accounts, sale

Entity Type A collection of entities that share common properties or characteristics. An entity type represents a collection of entities. A business environment may involve many entity types. –University: Faculty, Student, Course –Department, Employee, Dependent –Sales person, Customer, Order

Relationship Relationship: Interaction between entity types. –Faculty teach Course, Faculty advise Student –Customer open Account, Customer purchase Product. Binary relationship: A relationship involves two entity types. Three types of binary relationship: –1:1, 1:M, M:M

Entity-Relationship Diagram ER modeling begins by identifying the entities and relationships between entities that must be represented in the model. In an ERD, an entity type is represented by a rectangle labeled with a singular name. A relationship has a verb phrase name: –Faculty teach Course, Faculty advise Student

M:M Relationship Peter Paul John Woody Alan Mary Linda Nancy Mia Pia A boy may date 0, 1, or many girls. A girl may date 0, 1, or many boys. Note: “Many boys date many girls” is not a correct interpretation. Boy Girl

1:1 Relationship Peter Paul John Woody Alan Mary Linda Nancy Mia Pia A man may marry 0 or 1 woman. A woman may marry 0 or 1 man. Man Woman

1:M Relationship Peter Paul John Woody Alan Mary Brian Linda Aron Nancy Ronald Mia Pia A father has 1 or many children. A child has 1 father. Father Child

Other Examples 1:1 –State, State Governor –Order, Invoice 1:M –Department, Employee –Customer, Order M:M –Bank customer, Bank account –Student, Student organization

ERD Notations Student Account Faculty Course Has 11 Enroll MM Advise M 1 Teach M 1

Alternative Notations Student Account Faculty Course Has Teach Enroll Advise

Attributes Properties of an entity or a relationship. Simple attributes vs Composite attributes –Address:Street address, City, State, ZipCode Single-valued attributes vs multivalued attributes Derived attributes Primary key

Student SID Fname Lname DateOfBirth Age FullName Major

Domains of Attributes The set of allowable values for one or more attributes. Input validation Examples: –Sex: F, M –EmpHourlyWage: Between 6 and 300 –EmpName: 50 charcters

Introduction to Relational Database Data is logically structured within relations. Each relation is a table (file) with named columns (attributes, fields) and rows (records).

Properties of a Relation Simple attribute –No composite, no multivalued attribute Each relation must have a primary key: –Simple or composite key –May have other keys (candidate keys) –Key cannot be null –Cannot be duplicated

Relational Database Design Create a table for each entity that includes all simple attributes Relationship: –1:1, 1:M Relationship table Foreign key –M:M: relationship table

Database Design Example University: –1:1 Relationship: Student and Account –What is Peter’s account balance –Find students that owe more than 2000 dollars. –1:M Relationship Faculty Advisor and student –Who is Peter’s advisor? –How many students advised by Chao? –M:M Relationship Student and course –How many units Peter takes? –Find students that are taking 363.

Database Design Example Bank: –Customer, Account, bank employee

Database Design Example Order Processing: –Customer, Order, Product

AttorneyCase MM CourtJudge AID Aname Phone CID Cname JID Jname M 1 1M CtID Room Hours Phone

Advanced Topics Composite key Multivalued attribute –Student’s Major attribute –Faculty’s DegreeEarned attribute –Vehicle’s Color attribute –Others: PhoneNumber, Address Create a table for each multi-valued attribute Key + attribute Attributes on a relation

Online Shopping Cart Customer ShoppingCart Product Has 1 M M M CID Cname Addr CartIDDate PID Pname Price Phone

Order Form

Online Shopping Cart Customer ShoppingCart Product Has 1 M M M CID Cname Addr CartIDDate Qty PID Pname Price Phone

Attributes on Relationship Examples: –Student/Course: Grade –Order/Product: Quantity

Suggested Readings relationship_model eadings/erd.htmhttp://faculty.babson.edu/osborn/mis7510/r eadings/erd.htm design.htmlhttp://dhdurso.org/articles/database- design.html database-design#