Data Modeling and the Entity-Relationship Model CS 475 Lecture Notes.

Slides:



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

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.
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.
Systems Development Life Cycle
Text-Book Chapters (7 and 8) Entity-Relationship Model
Data Modeling is an Analysis Activity
Entity-Relation Modeling Hun Myoung Park, Ph.D., Public Management and Policy Analysis Program Graduate School of International Relations International.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Lecture Eleven Entity-Relationship Modelling
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 4 Entity Relationship (E-R) Modeling
Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – ER Model.
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
CS 405G Introduction to Database Systems
Entity Relationship Model Chapter 6. Basic Elements of E-R Model Entity Object of the real world that stores data. Eg. Customer, State, Project, Supplier,
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Data Modeling Using the Entity-Relationship Model
Entity-Relationship modeling Transparencies
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Data Modeling Using the Entity-Relationship Model
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
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.
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model.
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.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Chapter 5 Entity–Relationship Modeling
Chapter 11 (I) CIS458 Sungchul Hong. Chapter 11 - Objectives How to use Entity–Relationship (ER) modelling in database design. Basic concepts associated.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Chapter 7 Database Design and The E–R Model. 2 Goals n Facilitate DB design and represent the overall logical structure of the DB. n Definition Entities.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
1 Chapter 11 Entity-Relationship Modeling Transparencies Last Updated: 25 April 2011 By M. Arief
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
Chapter 11 & 12 Entity-Relationship (E-R) Model Characteristics of E-R Model Components of E-R Model Example of E-R Model Enhanced E-R Model.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Databases Illuminated Chapter 3 The Entity Relationship Model.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
Entity Relationship Modeling
Data Modeling Using the Entity-Relationship (ER) Data Model (Based on Chapter 3 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity-Relationship (ER) Data Model.
The Entity-Relationship Model CIS 4301 Lecture Notes 1/12/2006.
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.
Data Modeling Using the Entity- Relationship (ER) Model
Entity- Relationship (ER) Model
Entity Relationship Model
Tables and Their Characteristics
بسم الله الرحمن الرحيم.
Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Presentation transcript:

Data Modeling and the Entity-Relationship Model CS 475 Lecture Notes

CS Spring Outline of Lecture Overview of Database Modeling Entity-Relationship Model –Constructs –Relationships –Constraints Entity-Relationship Diagram Chapter 11, Sec

CS Spring Database Modeling Analysis of what information the database must hold Relationships among components of that information Database schema is specified in one of several languages or notations suitable for expressing designs Next, design is committed to a form which can be input to a DBMS  DB takes on physical existence Design notation in this course is Entity -Relationship (E/R) model Ideas ODL, UML, etc. E/R Object-Oriented DBMS Relational DBMS Relations

CS Spring Entity-Relationship Model Principal building blocks: –Entity: Real-world object, concept, or event –Entity type/set: Collection of entities of the same type (same properties); sets don’t have to be disjoint –Attribute: Values describing some property of an entity simple vs. composite single-valued vs. multi-valued stored vs. derived Null –Relationship: Association between two or more entity sets –Relationship type/set: Collection of relationships of the same type

CS Spring Examples - “Movie Database” Entity: –Star Attributes: –Name : “Harrison Ford” (simple, single-valued, stored) –Address : “123 Main Str., LA, CA” (complex) –Birthdate : “1-1-50” (simple) –Age : 50 (could be derived from Birthdate and current date) Entity Type: –Stars (Name, Address, Birthdate, Age) Entity Occurrence –a uniquely identifiable object of an entity type

CS Spring Entity Type in ERD STAR Represented by a rectangle with the entity name in it

CS Spring Attributes Attribute domain - set of allowable values Simple or Composite surname simple address composite (street,city,state) Single valued / multi-valued course_number contact_info - (phone, ,cell,etc) derived - may be generated from a set of attribute values, possibly from different entities.

CS Spring Relationships Define associations among entities Grouped together into relationships sets (types) Example: –Relationship type: Stars-in between Movies and Stars Can be visualized as a table Each entry is a relationship occurrence MoviesStars A. SchwarzeneggerTotal Recall Sharon StoneTotal Recall Sharon StoneBasic Instinct Relationships Relationship Type

CS Spring ERD Relationship StarMovie Stars in Represented by a diamond shape containing the relationship name

CS Spring Relationships Cont’d Degree of a relationship type is the number of participating entity types –binary, ternary, n-ary Example: –Entities: Stars, Movies, Studios –Ternary Relationship Set: Contracts Each entity type that participates in a relationship type plays a role in the relationship –Marked by (optional) name –Entity type may play multiple roles in a relationship type –Ex.: Relationship type Sequel-of between Movies and itself ( Movies )

CS Spring Relationships Cont’d Relationships can have attributes Example: Relationship type Contracts between Stars and Studios for Movies Might want to record salary associated with each contract Not necessary to place attributes on relationships; instead, can invent new entity type whose entities have the attributes ascribed to relationship

CS Spring Constraints on Relationships Limit the possible combinations of entities that participate in the relationship type –Derived from real-world scenario which is being modeled Multiplicity (Cardinality ratio) and participation constraints Cardinality ratio specifies the number of relationship occurrences an entity can participate in –1:1, 1:N, N:1, N:M

CS Spring Mapping Cardinalities Studio-Owns between Studio and Movies is 1:N Stars-in between Stars and Movies is M:N Teaches between Professors and Students is M:N Manages between staff and Branch is 1:1

CS Spring Relationship Constraints Cont’d Existence Dependency Existence of some entity x from entity type X depends on existence of some entity y from entity type Y –x is said to be existence dependent on y –if y is deleted, so is x Example: –Entity type Loans and Payments with relationship Loan-payment (1:N from Loans to Payments ) –Payment entities are existence dependent on loan entities

CS Spring Strong and Weak Entities Strong Entity type An entity type that is not existence-dependent on some other entity type. Weak Entity type an entity type that is existence-dependent on some other entity type – two rectangles

CS Spring Relationship Constraints Cont’d Participation constraint Participation of an entity type E in relationship type R: total or partial –Mandatory (Total) if every entity in E participates in at least one relationship in R –Optional (Partial) if only some entities in E participate in R –Represented by the min value in a min-max pair In previous example, participation of Payment entities in the relationship type Loan-payments is total

CS Spring ER Diagrams - Notation Entity Set Relationship Set Attribute Multivalued Derived... Composite Attribute E1E1 E2E2 R Total participation of E 2 in R E1E1 E2E2 R N1 1:N Relationship between E 1 and E 2 in R Role Name 1:n