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.

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

Entity-Relationship (ER) Modeling
Entity Relationship (E-R) Modeling Hachim Haddouti
Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
Entity-Relationship Model
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Systems Development Life Cycle
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke Database Processing Tenth Edition Chapter 5 Data.
Chapter Five Data Modeling with the Entity-Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 1 Data Models: Degrees of Data Abstraction l Modified ANSI/SPARC Framework.
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 (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Entity-Relationship Model
Chapter 4 Entity Relationship (E-R) Modeling
Chapter Five Data Modeling with the Entity-Relationship Model.
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
CSCI 242 Relational Data Modeling Copyright 2011, David C. Roberts, all rights reserved.
CSCI 6442 Entity-Relation Data Modeling Copyright 2012, David C. Roberts, all rights reserved.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
1 © Prentice Hall, 2002 CMIS564: E/R Modeling Dr. Bordoloi Based on Chapter 3; Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
3 Chapter 3 Entity Relationship (E-R) Modeling Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
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.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
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 3 The Entity-Relationship Model David M. Kroenke Database Processing © 2000 Prentice Hall.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Chapter 4 The Semantic Object Model David M. Kroenke Database Processing © 2000 Prentice Hall.
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.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
ENTITY-RELATIONSHIP MODELLING. Objectives: How to use Entity–Relationship (ER) modelling in database design. Basic concepts associated with ER model.
Entity Relationship (E-R) Model
Modeling data in the Organization
TMC2034 Database Concept and Design
Tables and Their Characteristics
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Review of Week 1 Database DBMS File systems vs. database systems
Chapter 4 Entity Relationship (ER) Modeling
Database Processing: David M. Kroenke’s Chapter Five:
Entity Relationship (ER) Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Presentation transcript:

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 Model Semantic Object Model Relational Model Page 47

4 Entity Relationship Data Model

5 Entity-Relationship Data Model Explicitly represents entities and their relationships Implementation independent For use at the conceptual and external levels Peter Pin-San Chen, The entity-relationship model---toward a unified view of data. ACM Transactions on Database Systems, Vol.1, No. 1, March portal.acm.orgThe entity-relationship model---toward a unified view of data

6 A picture with Peter Chen, the founder of E-R model

7 Entity-Relationship Data Model Entity A thing, event, or person in the organization's environment about which someone wants to collect data Attribute Characteristic or property of an entity Relationship Association between entities Composite entity (Associative entity) Represents both an entity and relationship Has its own properties

8 Components of E-R Model Entity Relationship Composite entity Attribute

9 An E-R Model for Student Registration System Entities CourseInstructor Student

Course Enrollment 10 An E-R Model for Student Registration System CourseInstructor Student Advises Teaches N M M 1 1 M Relationships Many-to-many One-to-many

11 An E-R Model for Student Registration System Composite Entity CourseInstructor Student Advises Teaches M M 1 1 M M 1 1 Class Enrollment

12 An E-R Model for Student Registration System Course Number Description Instructor ID Name Rank Room Course Number Grade Student Number Student Number Major Student Name Attributes CourseInstructor Student Advises Teaches M M 1 1 M M 1 1 Class Enrollment

Entities “something that users track” Page 49 Figure 3-1 © 2000 Prentice Hall

14 Attributes (properties) “describe the entity’s characteristics” Entity:Employee Attributes:EmployeeName, Extension, DateOfHire, JobSkillCode Attribute type Key attribute or identifier (i.e. employee number) Single value attribute (i.e. spouse) Multivalued attribute (i.e. children) Derived attribute (i.e. tax payment) Page 50

15 More about Entities Existence Dependency The existence of one entity depends on the existence of one or more other entities Fundamental entity vs. Attributive entity or Weak entity A weak entity is one that is existence-dependent and has a primary key that is partially or totally derived from the parent entity in the relationship. Entity Supertypes and Subtypes Exclusive (disjoint) and Inclusive (overlapping) Covering and non-covering

Subtype Entities “an entity that contains option sets of attributes” Page 56 Figure 3-10b © 2000 Prentice Hall

17 Relationships A relationship is an association between entities. A unary relationship exists when an association is maintained within a single entity. (Recursive relationship) A binary relationship exists when two entities are associated. (Most common) A ternary relationship exists when three entities are associated. (e.g. real estate sales: buyer, seller, and property)

18 Classroom Assignment Course Time Slots Classroom Assignment 1 M 1 1M M Convert a ternary relationship to three binary relationships

Relationships “associations between entities” Page 51 Figure 3-3 © 2000 Prentice Hall

20 Connectivity and Cardinality The term connectivity is used to describe the relationship classification (e.g., one-to-one, one-to-many, and many-to-many). Cardinality expresses the specific number of entity occurrences associated with one occurrence of the related entity. Relational Participation: Optional, Mandatory The actual number of associated entities is usually a function of an organization’s policy.

21 Connectivity and Cardinality Professor teaches Course Connectivity 1 M (0,3) (1,1) Mandatory entity Optional entity Cardinality

22 Building E-R Model Understand business rules and assumptions Identify entities Identify relationships Identify attributes Check and improve E-R model Convert E-R model to relational tables

Business rules A business rule is a statement that defines or constrains some aspect of the business. Business rules and policies govern creating, updating, and removing data in an information processing and storage system. 23

Example of business rules A student can take up to five courses each term Each course will be taught by only one teacher A customer must use valid credit card to make online payment A flower order can deliver to anywhere in North America but only one location 24

Business rules As a database analyst, you need to: Identify and understand those rules that govern data Represent those rules so that they can be unambiguously understood Implement those rules in database technology 25

26 Sales Order Form

27 An E-R Model for Order Processing: Product Number Description Customer Name Address Unit price Quantity Order Number Date S Name S ID Orders Total

28 An E-R Model for Order Processing: Entities Products Customer Orders Salesman

29 An E-R Model for Order Processing: Relationships Products Customer Orders 1 M M 1 1 Salesman M OrderLine PreparedPlaced M 1

30 An E-R Model for Order Processing: Attributes Product Number Description Customer Name Address Unit price Product Number Quantity Order Number Order Number Date Customer Name S NameS ID Products Customer Orders 1 M M 1 1 Salesman M OrderLine PreparedPlaced M 1

31 Crow's Foot Notation of E-R Diagram with Attributes Shown

Cardinality Symbols of Relationships for ERD

33 Check and improve E-R model Convert a multivalued attribute into an attribute entity or weak entity Introduce composite entity to convert a m:n relation into two 1:m relations. Introduce a composite key

34 Check and improve E-R model Each entity must have a key (simple or composite) Make each attribute associate with only one entity unless it is a foreign key Make each entity represent a simple object or concept Divide complex entity into several related simple entities

35 Example:A Construction Company A manager may manage many projects. Each project requires the services of many employees. An employee may be assigned to several different projects. Some employees are not assigned to a project and perform duties not specifically related to a project. Some employees are part of a labor pool, to be shared by all project teams. Each employee has a (single) primary job classification. This job classification determines the hourly billing rate. Many employees can have the same job classification.

36 A E-R Model for A Construction Company ProjectEmployee Job class Assignment

37 A E-R Model for A Construction Company ManagerWorker Subclass ProjectEmployee Job class Assignment

38 A E-R Model for A Construction Company ProjectEmployee Job class 1 M M M 1 1 M Assignment Manages Has 1

39 A E-R Model for A Construction Company Project Number Project name Job Code Job Description Hour Rate Manager ID Project Number Hours Employee Number Employee Number Employee Name Assignment Number Hire Date ProjectEmployee Job class 1 M M M 1 1 M Assignment Manages Has 1

40 The Semantic Object Model

Semantic Object Model E. F. Codd, “Extending the Relational Model to Capture More Meaning,” ACM Transactions on Database Systems, Dec. 1976, pp Micheal Hammer and Dennis McLeod, “Database Description with SDM: A Semantic Database Model,” ACM Transactions on Database Systems, Setp. 1981, pp

42 Semantic Objects “a named collection of attributes that sufficiently describes a distinct entity” Student Customer Employee Page 74

43 Attributes “ define the characteristics of semantic objects” Page 75 Figure 4-2a © 2000 Prentice Hall

44 Attribute Cardinality “indicates the minimum or maximum number of instances of the attribute that must exist in order for the object to be valid” Page 76 Figure 4-2b © 2000 Prentice Hall

45 Object Instances “ the occurrence of a particular semantic object” Page 77 Figure 4-3 © 2000 Prentice Hall

46 Object Identifier “one or more object attributes that the users employ to identify object instances” Example: CustomerID for Customer Page 78

47 Domain “a description of an attribute’s possible values” Page 78

48 Semantic Object View “ the portion of an object that is visible to a particular application; view” Page 79 Figure 4-4 © 2000 Prentice Hall

49 Highline University Administration Database Objects: College Department Professor Student Page 80

50 Semantic Object Diagrams Page 85 Figure 4-13 (1) © 2000 Prentice Hall

51 Semantic Object Diagrams Page 85 Figure 4-13 (2) © 2000 Prentice Hall

52 Semantic Object Diagrams Page 85 Figure 4-13 (3) © 2000 Prentice Hall

53 Semantic Object Diagrams Page 85 Figure 4-13 (4) © 2000 Prentice Hall

54 Sales Order Form

55 Semantic vs. E-R Model Page 105 Figure 4-34 © 2000 Prentice Hall

56 Semantic vs. E-R Model Page 105 Figure 4-33 © 2000 Prentice Hall