INTRODUCTION TO DATA MODELING CS 260 Database Systems.

Slides:



Advertisements
Similar presentations
the Entity-Relationship (ER) Model
Advertisements

Entity-Relationship (ER) Modeling
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
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
Text-Book Chapters (7 and 8) Entity-Relationship Model
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
1–1 The E-R Model Prof. Sin-Min Lee Department of Computer Science.
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Compe 301 ER - Model. Today DBMS Overview Data Modeling Going from conceptual requirements of a application to a concrete data model E/R 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.
Introduction to Data Modeling CS 146. What is a Data Model?  Definition: precise description of the data content in a system  Types of data models:
APPENDIX C DESIGNING DATABASES
Data Modeling 1 Yong Choi School of Business CSUB.
CS 405G Introduction to Database Systems
Data Modeling Using the Entity-Relationship Model
Entity-Relationship modeling Transparencies
Data Modeling Using the Entity-Relationship Model
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,
Data Modeling Using the Entity-Relationship Model
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 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.
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.
the Entity-Relationship Model
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Chapter 5 Entity–Relationship Modeling
Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 2: Representing Information with Data Models The lecture notes.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Introduction to Data Modeling
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.
Database Design 1: Introduction and Terminology CS 320.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Database Design 3: Advanced Data Modeling Concepts CS 320.
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Database Design 2: Creating an ER Model
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
ITTelkom Entity Relationship Diagram (1) CS2343 Perancangan Basisdata Relasional.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
advanced data modeling
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity-Relationship (ER) Data Model.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
1 CS 430 Database Theory Winter 2005 Lecture 3: A Fifty Minute Introduction to Data Modeling.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
COP Introduction to Database Structures
Entity-Relationship Model
Entity- Relationship (ER) Model
Overview of Entity‐Relationship Model
Entity-Relationship Diagram (ERD)
ER MODELING Instructor: SAMIA ARSHAD
Presentation transcript:

INTRODUCTION TO DATA MODELING CS 260 Database Systems

Overview  Introduction to data models  Entity-relationship (E-R) model components  Entities  Attributes  Relationships

Introduction to Data Models  A data model is a precise description of the data to be contained in a system  Data model levels: Conceptual, Logical, Physical  Conceptual Describes the data contained by a system at a high level Focuses on the data entities and their relationships Design should be independent of storage mechanism (e.g. database) Should be general enough to apply to multiple logical models

Introduction to Data Models  Data model levels (continued)  Logical Describes the data contained by a system in more detail Application of the conceptual model on a particular storage mechanism (e.g. relational database) Should be general enough to apply to multiple physical models For relational databases, the logical model may be very similar to the conceptual model  Physical Describes the data contained by a system with the most detail Application of the logical model on a specific implementation of a particular storage mechanism (e.g. Oracle relational database) Implemented for relational databases using DDL

Introduction to Data Models  Why create data models?  Data models aid in the development of a complete, sound database design that does not contain redundant data values which can become inconsistent  Examples of redundant data on the next slide What happens if a department changes its name or gets a new manager? Are there any problems with this data already? What happened with Joyce A. English? What happened with Product X? If EMPLOYEE_PROJECTS is the only place where a project’s name and location are associated, what happens if Franklin T. Wong quits?

Introduction to Data Models

Overview  Introduction to data models  Entity-relationship (E-R) model components  Entities  Attributes  Relationships

Entity-Relationship Models  This classic data model addresses data and the relationships between that data  Developed to facilitate database design  Many extensions and variations exist  Components  Entities  Attributes  Relationships

Overview  Introduction to data models  Entity-relationship (E-R) model components  Entities  Attributes  Relationships

Entities  Entity  An entity is a “thing” or “object” in the real world that is distinguishable from all other objects  Similar to a Java class  Examples Customer Product  Naming conventions Use short, singular, descriptive names Logical models for a relational database should use names that consist of multiple words and be unique

Entities  Entity instance  A specific occurrence of an entity  Similar to a Java object  An entity must have multiple entity instances  Examples The customer identified by “Bobby Bon Bons” The product identified by “Celestial Cashew Crunch”

Overview  Introduction to data models  Entity-relationship (E-R) model components  Entities  Attributes  Relationships

Attributes  Attribute  An attribute is a descriptive property possessed by each entity instance  Examples Name Price  Naming conventions Use short, descriptive names Logical models for relational databases should use names that consist of multiple words and are appropriately unique

Attributes  Attribute value  An attribute value is the value of a particular attribute for a particular entity instance  Examples Bobby Bon Bons 1.5  If an attribute’s value uniquely identifies an entity instance, then that attribute is a key

Attributes  Attribute characteristics  Atomic (simple) vs. composite Atomic: cannot be reasonably divided into subparts Composite: can be reasonably divided into subparts Examples Atomic: 105 Garfield Ave. Composite: 105 Garfield Ave., Eau Claire, WI 54701

Attributes  Attribute characteristics  Single-valued vs. multivalued Single-valued: always only one attribute value per attribute Multivalued: multiple attribute values per attribute possible Examples Phone number: (555) Phone numbers: (555) , (555)

Attributes  Attribute characteristics  Derived A derived attribute is one who’s value can be inferred from the value of other attributes or entities Example Age can be inferred if a date of birth attribute is present for the associated entity

Overview  Introduction to data models  Entity-relationship (E-R) model components  Entities  Attributes  Relationships

Relationships  Relationship  A relationship is an association among entities Entities “participate” in relationships  A relationship may also have attributes  An entity may have a specified “role” that indicates how that entity participates in the relationship  Examples A customer has a customer type A purchase consists of a customer and a product

Relationships  Relationship constraints  Cardinalities Cardinalities express the number of entity instances that participate in a relationship Types One-to-one (1:1) One-to-many (1:M) Many-to-many (M:M)

Relationships  Cardinality types  One-to-one (1:1) An entity instance A is associated with at most one entity instance B, and an entity instance B is associated with at most one entity instance A Example In a system that has an Employee entity and a Spouse entity, a 1:1 relationship exists between them An employee can have at most one spouse, and a spouse can be associated with at most one employee Are there any 1:1 relationships in our candy database?

Sample Database (CANDY) CANDY_CUSTOMER CANDY_PURCHASE CANDY_CUST_TYPE CANDY_PRODUCT

Relationships  Cardinality types  One-to-many (1:M) An entity instance A is associated with zero or more instances of entity B, and an entity instance B can be associated with at most one entity instance A Example In a system that has a Store entity and a Product entity, a 1:M relationship exists between them A single store can have multiple products, but a product can belong to at most one store A many-to-one relationship (M:1) exists as well to indicate the inverse of a 1:M relationship Are there any 1:M relationships in our candy database?

Sample Database (CANDY) CANDY_CUSTOMER CANDY_PURCHASE CANDY_CUST_TYPE CANDY_PRODUCT

Relationships  Cardinality types  Many-to-many (M:M) An entity instance A is associated with zero or more instances of entity B, and an entity instance B is associated with zero or more instances of entity A Example In a system that has a Student entity and a Course entity, a M:M relationship exists between them A student may take zero or more courses, and a course may have zero or more enrolled students Are there any M:M relationships in our candy database?

Sample Database (CANDY) CANDY_CUSTOMER CANDY_PURCHASE CANDY_CUST_TYPE CANDY_PRODUCT

Entity-Relationship Models  In a database for an Italian restaurant, match the following items with their component types:  “Entrée”  “Pasta Primavera”  “Entrée price” A.Entity B.Attribute C.Entity instance D. Attribute instance