CIT 381 Slides part 3. Review: One-to-many and many-to-one One movie is stored on many videos – many videos are in one store. Both relationships are mandatory.

Slides:



Advertisements
Similar presentations
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Advertisements

--The Entity Relationship Model(3)--1 Outline  ER model  Overview  Entity types Attributes, keys  Relationship types  Weak entity types  Uses Crows.
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.
Concepts of Database Management Sixth Edition
Relational Databases Relational Model Primary Keys Relation or Relationship Foreign Keys Relationships between entities Integrity Constraints Power of.
Database Design & Mapping
CIT 381 ER Modeling Difficulties - categories - generalization - three-way relationships.
1 MIS 340: Data Modeling 2 Yong Choi School of Business CSUB.
CIT 381 More ER Modeling - review one-to-many - one-to-one - recursive relationships.
--The Entity Relationship Model(2)--1 Reflexive Rela1tionships  An entity may be related to another entity of the same type.  Example: A Customer could.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Information Resources Management February 13, 2001.
Methodology Logical Database Design for the Relational Model
Mapping the ER Model to Relations(1)1 Overview  Mapping entity types  Mapping relationship types  One-to-one  One-to-many  Many-to-many.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
Motivation for IDEF1X Simplicity Common Standard Useful when relational model is target Air Force 1985 or thereabouts.
Concepts of Database Management Seventh Edition
CIT 381 ER Basics - relationship types - foreign keys - ER Studio.
Slide 1 Chapter 05 – Part 1 Data Modeling with the Entity-Relationship Model.
WJEC Applied ICT Databases – Attributes & Entities Entities A database contains one or more related tables. Each table holds all of the information.
 An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database.  An Entity Relationship.
 Keys are special fields that serve two main purposes: ◦ Primary keys are unique identifiers of the relation in question. Examples include employee numbers,
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Entity-Relationship modeling Transparencies
Entity-Relationship Modeling I The cautious seldom err. Confucius.
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model.
the Entity-Relationship Model
Chapter 5 1 © Prentice Hall, 2002 Chapter 5: Transforming EER Diagrams into Relations Mapping Regular Entities to Relations 1. Simple attributes: E-R attributes.
ICOM 5016 – Introduction to Database Systems Lecture 4 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Chapter 3: Modeling Data in the Organization
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
DATA MODELING AND DATABASE DESIGN
Converting ER model Into Relational Table
Relational DB Components
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
IS 325 Notes for Wednesday September 4, Syllabus Change I eliminated quizzes I increased the points allocated to homework assignments.
The REA Model. The REA model provides structure for developing an accounting database It helps to identify It helps to The REA Model.
Principles of Database Design, Part II AIMS 2710 R. Nakatsu.
Database Management System
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
Chapter 3: Relational Model I Structure of Relational Databases Structure of Relational Databases Convert a ER Design to a Relational Database Convert.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
CSCI 3140 Module 3 – Logical Database Design for the Relational Model Theodore Chiasson Dalhousie University.
Concepts of Database Management Sixth Edition Chapter 6 Database Design 2: Design Method.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
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.
Data Modeling IST210 Class Lecture.
CS 370 Database Systems Lecture 9 The Relational model.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
Microsoft Access 2013 ®® Tutorial 9 Using Action Queries and Advanced Table Relationships.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology.
An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.
Description and exemplification of entity-relationship modelling.
Jozef Kuper.  Describe a Database  Entities  Atributes  Relationships.
E-R to Relational - Basic
Databases Illuminated Chapter 3 The Entity Relationship Model.
Chapter 9 Logical Database Design : Mapping ER Model To Tables.
1 6 Concepts of Database Management, 5 th Edition, Pratt & Adamski Chapter 6 Database Design 2: Design Methodology Spring 2006.
Database Systems – ER Diagrams EXAMPLE COMPANY DATABASE Requirements of the Company (oversimplified to illustrate) The company is organized into DEPARTMENTs.
Chapter 2 Data Modeling Using the Entity-Relationship (ER) Model Copyright © 2004 Pearson Education, Inc.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
Database Design Slide 1 Database Design Lecture 7 part 2 Mapping ERD to Tables.
IST 220 – Intro to DB Lecture 4 Database Design thru ER Modeling.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Relational Database Design by ER- and EER-to-Relational Mapping
Presentation transcript:

CIT 381 Slides part 3

Review: One-to-many and many-to-one One movie is stored on many videos – many videos are in one store. Both relationships are mandatory. (Why?)

Review: one-to-many optional Here a mechanic can service many cars but a car does not need to have a mechanic.

Review: resolve many-to-many Here an employee can work in many stores, and a store can have many employees. Use bridging entity for M:N relationships starting with this change to this

Other relationships Note: only the first three possible in ER Studio. Usually they’d use a dotted line.

Participation A car has zero or one mechanics (mech_ssn can be null). Every mechanic must be the mechanic of some car. The “P” stands for participates. It does not affect the table design, it’s just information for us.

One-to-one relationships Suppose we have store and employee entities. Each store has one manager. An employee can only manage one store.

More one-to-one What does the Z mean when we have a 1:1 relationship? It is not related to “optional”. An employee will manage either one store or zero stores. “Optional” means that a store could exist with no manager.

Role names Instead of ssn, we might want to rename the foreign key to manager_ssn. In ER Studio we would use the “edit rolenames” feature

Recursive relationship It is possible to have a relationship between an entity and itself. Rolenames are required. ex: one employee can be the supervisor of another.

Time to talk about keys Superkey Candidate Key Primary Key Alternate Key Surrogate Key