Conceptual Data Modeling, E-R Diagrams. Outline  Purpose and importance of conceptual data modeling  Entity-Relationship Model Entity  Attributes Relationships.

Slides:



Advertisements
Similar presentations
Entity Relationship Diagrams
Advertisements

Chapter 6: Entity-Relationship Model (part I)
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.
Modeling the Data: Conceptual and Logical Data Modeling
Database Design & Mapping
System Analysis - Data Modeling
Systems Analysis Requirements structuring Process Modeling Logic Modeling Data Modeling  Represents the contents and structure of the DFD’s data flows.
Chapter 3: Modeling Data in the Organization
DATABASE APPLICATION DEVELOPMENT SAK 3408
Chapter 3: Modeling Data in the Organization
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
© 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 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.
Computer System Analysis Chapter 10 Structuring System Requirements: Conceptual Data Modeling Dr. Sana’a Wafa Al-Sayegh 1 st quadmaster University of Palestine.
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.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization Modern Database Management 10 th Edition Jeffrey.
Chapter 3: Modeling Data in the Organization
Chapter 3: Modeling Data in the Organization
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
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.
Chapter 2: Modeling Data in the Organization
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Conceptual Data Modeling, Entity Relationship Diagrams
Conceptual Data Modeling. What Is a Conceptual Data Model? A detailed model that shows the overall structure of organizational data A detailed model.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization.
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.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
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.
Chapter 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall Chapter 2: Modeling Data in the Organization Modern Database Management 11 th Edition.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Carnegie Mellon University © Robert T. Monroe Management Information Systems Data Modeling Management Information Systems Robert.
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.
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.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
Pree Thiengburanathum, CAMT, Chiang Mai University 1 Database System Modeling Data in the Organization October 31, 2009 Software Park, Bangkok Thailand.
Chapter 2: Modeling Data in the Organization
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Lecture 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Business System Development
Entity Relationship Model
Logical Data Modeling.
Overview of Entity‐Relationship Model
Entity Relationship Diagrams
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Review of Week 1 Database DBMS File systems vs. database systems
Chapter 3: Modeling Data in the Organization
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
ER MODELING Instructor: SAMIA ARSHAD
Lecture 10 Structuring System Requirements: Conceptual Data Modeling
Presentation transcript:

Conceptual Data Modeling, E-R Diagrams

Outline  Purpose and importance of conceptual data modeling  Entity-Relationship Model Entity  Attributes Relationships

SDLC Revisited – Data Modeling is an Analysis Activity Project Identification and Selection Project Initiation and Planning Analysis Physical Design Implementation Maintenance Logical Design Purpose –thorough analysis of the business domain Deliverable – system specifications Database activity – conceptual data modeling

Role of a Data Model Data Model Process Model Database Programs Repository Data Processing Model

Importance of Conceptual Data Modeling  Data rather than processes are more complex in many modern information systems.  Characteristics of data (structure, properties) are more stable, i.e. less likely to change over time, easier to reach consensus on.  It is shared between many processes, therefore is crucial in the design of databases, ensuring integrity of the data in an information system, efficiency of processing.

Sample E-R Diagram (figure 3-1)

Business Rules  Policies and rules about the operation of a business that a data model represents Govern how data is stored and handled. E.g. “a section of a course has between 15 and 35 students”  Must be expressed in terms familiar to end users, clear and concise.  Not all business rules are related to data

A Good Business Rule is:  Declarative – what, not how  Precise – clear, agreed-upon meaning  Atomic – one statement  Consistent – internally and externally  Expressible – structured, natural language  Distinct – non-redundant  Business-oriented – understood by business people

Basic E-R Model Constructs and notation  Entity Attribute  Relationship

An Entity  Something of interest in the environment (e.g., person, place, object, event, concept)  Represented in E-R diagram by a rectangle  An instance is a particular occurrence of an entity CUSTOMER Entity, or Entity Type 0010 Scott George 56 Neat Street Boulder, Colorado An Instance of the Customer Entity

Entities  Entity Type - a collection of entity instances that share common properties (also simply called an Entity)  Entity Instance - an individual occurrence of an entity type

What Should an Entity Be?  SHOULD BE: An object that is important to business An object that will have many instances in the database An object that will be composed of multiple attributes  SHOULD NOT BE: A user of the database system An output of the database system (e.g. a report)

Inappropriate entities System user System output Appropriate entities Figure 3-4

An Attribute  A discrete data element  A characteristic (property) of an entity CUSTOMER Customer_Number Last_Name First_Name Address City State Zip Phone This Customer entity  has eight attributes

Types of Attributes  Simple vs. Composite Simple - most basic level Composite – decomposable into a group of related attributes  ex: address (street, city, state, zip)  Single Valued vs. Multi Valued – Single - only one value per entity instance (e.g., last name, date of birth) Mulitvalued- multiple values per entity instance (e.g., degrees, clubs, skills)  Stored vs Derived (e.g. DateOfBirth vs Age )  Identifier attribute (key) (e.g. SSN of a person)

Attributes on ERDs May be shown on ERDs as ellipses PHYSICIAN PATIENTS Admits 0 emp-id name address pt-num nameward

Attributes on ERDs  Multivalued attributes are shown as double ellipses EMPLOYEE emp-id name skills f_name l_name m_name Multivalued composite  Composite attributes may be shown broken down into their simple components Simple/Single Valued; Primary Key

Identifiers/Primary Key  Every instance of an entity must be uniquely identified (to unambiguously distinguish them)  An identifier can be one or more attributes called a composite identifier (e.g., first name, middle name, and last name)  Create an identifier if there is no obvious identifying attribute (e.g., part number)  Underline identifiers in diagrams

Identifiers  Must be unique  Should not change value over time  Guaranteed to have a valid value  No intelligent identifiers (e.g. containing locations or people that might change)  Consider substituting single-attribute identifiers for composite identifiers to simplify design and enhance performance CUSTOMER Customer_Number Last_Name First_Name Address City State Zip Phone

Example Entity & Instances Cust_ID Last_Name First_Name Address City ST Zip 0001 Snerd Mortimer General Delivery Tampa FL Fogg Bob 567 Fogg Lane Omaha NE Amos Famous 2 Cookie Ct. Miami FL Targa Maxine 67 Fast Lane Clinton NJ George Scott 56 Neat St. Boulder CO Guy Nice 290 Pleasant St. Tampa FL Smith Bob 76 Quaker Path Wynn NY Smith James 234 Bayview Tampa FL Identifier Attribute

Relationships  A relationship is an association between one or more entities  The degree of a relationship indicates the number of entities involved  The cardinality of a relationship describes the number of instances of one entity associated with another entity

Degrees of Relationships: unary and binary The number of different entities involved in a relationship EMPLOYEE Manages UNARY STUDENT DORMITORY Is assigned BINARY

Note: a relationship can have attributes of its own Degrees of Relationships - ternary A vendor supplies parts to warehouses. The unit cost and delivery method may differ for every warehouse.

Cardinality Constraints  Cardinality Constraints - the number of instances of one entity that can or must be associated with each instance of another entity.  Minimum Cardinality If zero, then optional If one or more, then mandatory  Maximum Cardinality The maximum number

Cardinality Constraints 0 Optional relationships none or one 0 0none or more Mandatory relationships one and only one one or more WOMAN CHILDREN Bears 0

More on Relationships  Relationships can have attributes These describe features pertaining to the association between the entities in the relationship  Two entities can have more than one type of relationship between them (multiple relationships)  Associative Entity = combination of relationship and entity  Some typical cases

Examples of multiple relationships – entities can be related to one another in more than one way Figure 3-21a Employees and departments

Hierarchical Relationships  Occur frequently  Model as multiple 1:M relationships FIRM DIVISION DEPT

Time stamping

Figure 3-21a Employees and departments Entities can be related to one another in more than one way

Strong vs. Weak Entities, and Identifying Relationships  Strong entities exist independently of other types of entities has its own unique identifier represented with single-line rectangle  Weak entity dependent on a strong entity…cannot exist on its own Does not have a unique identifier represented with double-line rectangle  Identifying relationship links strong entities to weak entities represented with double line diamond

Associative Entities  Associative entities provide details of a many-to-many association.  It’s an entity – it has attributes  AND it’s a relationship – it links entities together  When should a relationship with attributes instead be an associative entity ? Guidelines: All relationships for the associative entity should be many The associative entity could have meaning independent of the other entities The associative entity preferably has a unique identifier, and should also have other attributes The associative may be participating in other relationships other than the entities of the associated relationship Ternary relationships should be converted to associative entities

Associative entity is depicted as a rectangle with a diamond inside. An associative entity (CERTIFICATE) (Fig. 3-11b)

Modeling a ternary relationship as an associative entity