Data Modeling Yong Choi School of Business CSUB. Part # 2 2 Study Objectives Understand concepts of data modeling and its purpose Learn how relationships.

Slides:



Advertisements
Similar presentations
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Advertisements

Entity Relationship (E-R) Modeling Hachim Haddouti
Entity Relationship (ER) Modeling
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
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.
Chapter 4 Entity Relationship (E-R) Modeling
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
Entity Relationship (E-R) Modeling
1 MIS 340: Data Modeling 2 Yong Choi School of Business CSUB.
Data Modeling Yong Choi School of Business CSUB. Part # 2 2 Database Collection of data in electronic format – A digital library of organization Managed.
Chapter 3: Modeling Data in the Organization
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 1 Data Models: Degrees of Data Abstraction l Modified ANSI/SPARC Framework.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 4 Entity Relationship (E-R) Modeling
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
Data Modeling 1 Yong Choi School of Business CSUB.
APPENDIX C DESIGNING DATABASES
Data Modeling 1 Yong Choi School of Business CSUB.
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.
Entity Relationship Modeling Objectives: To illustrate how relationships between entities are defined and refined. To know how relationships are incorporated.
Yong Choi School of Business CSUB
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
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.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
1 Data Modeling 2 Yong Choi School of Business CSUB.
Chapter 5 Entity–Relationship Modeling
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
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.
CS370 Spring 2007 CS 370 Database Systems Lecture 4 Introduction to Database Design.
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 
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Data Modeling Using the Entity-Relationship (ER) Model.
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.
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
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.
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 MODEL Melissa Ann D. Callejo Chairmane Abanilla.
TMC2034 Database Concept and Design
Entity Relationship (E-R) Modeling
© The McGraw-Hill Companies, All Rights Reserved APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Entity Relationship (E-R) Modeling
Data Modeling for Database Design 1
Data Modeling for Database Design 1
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Data Modeling for Database Design 2
Chapter 4 Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
Presentation transcript:

Data Modeling Yong Choi School of Business CSUB

Part # 2 2 Study Objectives Understand concepts of data modeling and its purpose Learn how relationships between entities are defined and refined, and how such relationships are incorporated into the database design process Learn how ERD components affect database design and implementation Learn how to interpret the modeling symbols

Part # 2 3 Why Data Modeling? Data Model by CASE tool = Actual Database Represent “reality” of the actual database Blue print: documentation Effective Communication Tool User involvement Identify the business rules to be stored in the database Independence from a particular DBMS Example of data model by CASE tool on the website

Part # 2 4 Conceptual data modeling The conceptual data modeling revolves around discovering and analyzing organizational and users data requirements. What data is important What data should be maintained The major activity of this phase is identifying entities, attributes, and their relationships to construct model using the Entity Relationship Diagram methodology.

Part # 2 5 Entity Relationship diagram (ERD) Data modeling methodology Developed by Peter Chen (1976). See his original ERD article on the class website ERD is commonly used to: Translate different views of data among managers, users, and programmers to fit into a common framework. Define data processing and constraint requirements to help us meet the different views. Help implement the database.

Part # 2 6 Basic ERD Elements Entity : a collection of people, places, objects, events, concepts of interest (a table) Entity instance – a member of the Entity : a person, a place, an object … (a row in a table) Attribute - property or characteristic of interest of an entity (a field in a table) Relationship – association between entities (corresponds to primary key-foreign key equivalencies in related tables)

Part # 2 ERD using Chen’ Notation (first - original)

Part # 2 8 Chen’s Notation Entities rectangle containing the entity’s name. Attributes oval containing the attribute’s name. Relationships diamond containing the relationship’s name.

Part # 2 9 Steps for creating an ERD 1. Identify entities 2. Identify attributes 3. Identify relationships

Part # 2 10 Entity “A fundamental THING of relevance to the enterprise about which data may be kept” What should be an Entity: both tangible & intangible An object that will have many instances in the database An object that will be composed of multiple attributes An object that we are trying to model What should NOT be an Entity: A user of the database system An output of the database system (e.g. a report)

Part # 2 11 ERD using IE Notation (most popular)

Part # 2 12 Entity Instance Entity instance: a single occurrence of an entity. 6 instances Student ID Last Name First Name 2144ArnoldBetty 3122TaylorJohn 3843SimmonsLisa 9844MacyBill 2837LeathHeather 2293WrenchTim Entity: student instance

Part # 2 13 “describe property or characteristic of an entity ” Entity: Employee Attributes: Employee-Name Address (composite) Phone Extension Date-Of-Hire Job-Skill-Code Salary Attributes

Part # 2 14 Classes of attributes Simple attribute Composite attribute Derived attributes Single-valued attribute Multi-valued attribute

Part # 2 15 A simple attribute cannot be subdivided. Examples: Age, Gender, and Marital status A composite attribute can be further subdivided to yield additional attributes. Examples: ADDRESS --  Street, City, State, Zip PHONE NUMBER --  Area code, Exchange number Simple/Composite attribute

Part # 2 16 is not physically stored within the database instead, it is derived by using an algorithm. Example: AGE can be derived from the date of birth and the current date. MS Access: int(Date() – Emp_Dob)/365) Derived attribute

Part # 2 17 “attributes that uniquely identify entity instances” Uniquely identify every instance of the entity One or more of the entity’s attributes Composite identifiers are identifiers that consist of two or more attributes Identifiers are represented by underlying the name of the attribute(s) Employee (employee_ID), student (student_ID) (unique) Identifier

Part # 2 Type of Relationships One – to – One (1:1) Each instance in the relationship will have exactly one related member on the other side One – to – Many (1:M) A instance on one side of the relationship can have many related members on the other side, but a member on the other side will have a maximum of one related instance Many – to – Many (M:N) Instances on both sides of the relationship can have many related instances on the other side

Part # 2 1:1 relationship in Set notation

Part # 2 1:M relationship in Set notation

Part # 2 M:N relationship in Set notation

Part # 2 M:N relationship Each student takes many classes, and a class must be taken by many students. ** Many-to-many relationships cannot be used in the data model because they cannot be represented by the relational model (see the next slide for the reason) ** STUDENT CLASS TAKE IS_TAKEN_BY

Part # 2 Example of M:N Many-to-many relationships is a second sign of complex data. When x relates to many y's and y relates to many x's, it is a many-to-many relationship. In our example schema, a color swatch can relate to many types of sweaters and a type of sweater can have many color swatches.

Part # 2 Example M:N Relationship 3 to 3 30 to to to ,000 to 30, , 000 to 300, 000 Table to represent Entity

Part # 2 Converting M:N Relationship to Two 1:M Relationships Bridge Entity

Part # 2 Bridge Entity MUST have a composite (unique) identifier  STU_NUM (from STUDENT entity) and CLASS_CODE (from CLASS entity)