CS34311 The Entity- Relationship Model Part II.. CS34312 Database Design Stages Application Requirements Conceptual Design Logical Design Physical Design.

Slides:



Advertisements
Similar presentations
Conceptual Design using the Entity-Relationship Model
Advertisements

Week 5 Relational Database Design by ER- -to-Relational Mapping.
Mapping ER to Relational Model
Chapter 31 Chapter 3 Data Modeling Using the Entity-Relationship Model.
CS34311 Translating ER Schema to Relational Model.
Murali Mani The Relational Model. Murali Mani Why Relational Model? Currently the most widely used Vendors: Oracle, Microsoft, IBM Older models still.
Introduction to Relational Database ISYS 464. Introduction to Relational Model Data is logically structured within relations. Each relation is a table.
Copyright © 2004 Pearson Education, Inc.. Chapter 3 Data Modeling Using the Entity-Relationship Model.
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
CS34311 The Entity- Relationship Model. CS34312 Database Design Stages Application Requirements Conceptual Design Logical Design Physical Design Conceptual.
Modeling Your Data Chapter 2. Part II Discussion of the Model: Good Design/ Bad Design?
Murali Mani The Entity- Relationship Model. Murali Mani Database Design Stages Application Requirements Conceptual Design Logical Design Physical Design.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
The Entity-Relationship Model. 421B: Database Systems - ER Model 2 Overview of Database Design q Conceptual Design -- A first model of the real world.
Entity-Relationship modeling Transparencies
3.1 CSIS 3310 Chapter 3 The Entity-Relationship Model Conceptual Data Modeling.
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model.
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 7 Relational Database Design by ER- to-Relational Mapping.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 7 Relational Database Design by ER- Mapping.
Entity-Relationship Model Ch. 3
ER to Relational Translation COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
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 9: Logical Database Design and the Relational Model (ERD Mapping)
CS3431: C-Term The Entity- Relationship Model Part II. Instructor: Mohamed Eltabakh
1 Translating ER Schema to Relational Model Instructor: Mohamed Eltabakh
Chapter 3 Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Slide Chapter 7 Relational Database Design by ER- to-Relational Mapping.
Logical Design database design. Dr. Mohamed Osman Hegaz2 Conceptual Database Designing –Provides concepts that are close to the way many users perceive.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Conceptual Modeling and Database Design.
1 Conceptual Design using the Entity- Relationship Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
CS34311 Translating ER Schema to Relational Model.
Software School of Hunan University Database Systems Design Part III : Mapping ER Diagram to Relational Schema.
1 The Entity- Relationship Model Instructor: Mohamed Eltabakh
Lecture 03 Entity-Relationship Diagram. Chapter Outline.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity-Relationship (ER) Data Model.
1 The Entity- Relationship Model Instructor: Mohamed Eltabakh Part-2.
CS34311 The Entity- Relationship Model Part I.. CS34312 Database Design Stages Application Requirements Conceptual Design Logical Design Physical Design.
The Entity-Relationship Model
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
CS34311 The Entity- Relationship Model Part III..
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
ER- Relational Mapping (Based on Chapter 9 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
Modeling Your Data Chapter 2 cs5421. Part II Discussion of the Model: Good Design/ Bad Design? cs5422.
Mapping ER Diagrams to Tables
Database Management COP4540, SCS, FIU Database Modeling Using the Entity- Relationship Model (Continued)
Lecture (8) 1. Relational Database Design by ER- and EERR- to-Relational Mapping 2.
CS3431-B111 The Entity- Relationship Model Part II. Instructor: Mohamed Eltabakh
CS3431: C-Term Translating ER Schema to Relational Model Instructor: Mohamed Eltabakh
CS34311 Translating ER Schema to Relational Model.
Relational Database Design by ER- and EER-to-Relational Mapping
COP Introduction to Database Structures
Relational Database Design by ER- and EER-to-Relational Mapping
Relational Database Design by ER- and EERR-to-Relational Mapping
Relational Database Design by ER-to-Relational Mapping
Chapter (9) ER and EER-to-Relational Mapping, and other Relational Languages Objectives How a relational database schema can be created from a conceptual.
Translating ER Schema to Relational Model
Chapter (9) ER and EER-to-Relational Mapping, and other Relational Languages Objectives How a relational database schema can be created from a conceptual.
The Entity-Relationship Model
The Entity-Relationship Model
الفصل الخامس قواعد البيانات Databases
Entity – Relationship Model
Relational Database Design by ER- and EER-to-Relational Mapping
Relational Database Design by ER- and EERR-to-Relational Mapping
Relational Database Design by ER- and EER-to-Relational Mapping
Chapter (7) ER-to-Relational Mapping, and other Relational Languages
Relational Database Design by ER-to-Relational Mapping
Presentation transcript:

CS34311 The Entity- Relationship Model Part II.

CS34312 Database Design Stages Application Requirements Conceptual Design Logical Design Physical Design Conceptual Schema Logical Schema Physical Schema

CS34313 Relationship types in ER Model 3-ary “supplies” relationship: Supplier supplies Products to Consumers

CS34314 Recursive Relationship Types and Roles Recursive relationship type : Part-Subpart Roles: There are Parts that play the role of superPart There are Parts that play the role of subPart

CS34315 ER Model so far Structures Entity Types Relationship Types Binary, ternary, n-ary Recursive Attributes For entity types and relationship types Simple, composite, multivalued Roles

CS34316 ER Model: Key Constraints How : Underline the key attribute/attributes Key for Student is sNumber Key for Movie is Note: We can represent key for entity type consisting of more than 1 attribute (e.g.: Movie) We cannot represent multiple keys for an entity type (e.g: key for Student can be either sNumber or sName)

CS34317 ER Model: Cardinality Constraints How : Expressed using (min, max) Student can take >= 2 and <= 3 Courses Course can have >= 0 and <= * (infinity) Students min and max are non-negative integers max > min

CS34318 Cardinality Constraints 1:1 relationship type: A Dept has exactly one Manager, A Person can manage at most one Dept Person pNumber pName Dept dNumber dName Manages

CS34319 Cardinality Constraints 1:1 relationship type: A Dept has exactly one Manager, A Person can manage at most one Dept

CS Cardinality Constraints 1:1 relationship type: A Dept has exactly one Manager, A Person can manage at most one Dept

CS Cardinality Constraints 1:many relationship type: A Person works for exactly one Dept, A Dept can have any number of Persons Person pNumber pName Dept dNumber dName Works For

CS Cardinality Constraints 1:many relationship type: A Person works for exactly one Dept, A Dept can have any number of Persons

CS Cardinality Constraints 1:1 relationship type: A Dept has exactly one Manager, A Person can manage at most one Dept 1:many (1:n) relationship type: A Person works for exactly one Dept, A Dept can have any number of Persons Person pNumber pName Dept dNumber dName Manages (0, 1)(1, 1) Person pNumber pName Dept dNumber dName Works For (1, 1)(0, *)

CS Cardinality Constraints 1:1 relationship type: A Dept has exactly one Manager, A Person can manage at most one Dept 1:many (1:n) relationship type: A Person works for exactly one Dept, A Dept can have any number of Persons

CS Cardinality Constraints many:many (m:n) relationship type: A Person works for one or more Depts, A Dept can have any number of Persons Person pNumber pName Dept dNumber dName Works For

CS Cardinality Constraints many:many (m:n) relationship type: A Person works for one or more Depts, A Dept can have any number of Persons

CS Cardinality Constraints for n-ary relationships A Supplier supplies at least one Product to some Consumer Supplier sName sLoc Consumer cName cLoc Supply price Product pName pNumber qty

CS Cardinality Constraints for n-ary relationships A Supplier supplies at least one Product to some Consumer

CS Cardinality Constraints for n-ary relationships What about the following constraints : (1) A Consumer gets a Product from only one Supplier (2) Each Supplier supplies exactly 2 Products

CS Cardinality Constraints for Recursive Relationships A Part can be subpart of one superPart A Part can have many subParts Contains Part pName pNumber subPartsuperPart quantity

CS Cardinality Constraints for Recursive Relationships A Part can be subpart of one superPart A Part can have many subParts

CS Cardinality Constraints for Recursive Relationships A Part can be subpart of one superPart A Part can have many subParts A Part can be subpart of many superParts A Part can have many subParts

CS Cardinality Constraints for Recursive Relationships A Part can be subpart of one superPart A Part can have many subParts A Part can be subpart of many superParts A Part can have many subParts

CS ER Model Constraints Summary Key Constraints Cardinality Constraints Expressed using (min, max) Binary relationship types are called 1:1, 1:many, many:many

CS Summary of ER Structures Entity Types Relationship types – binary, ternary, n-ary. recursive Attributes For entity types or relationship types Simple, composite or multi-valued Constraints – key, cardinality Roles of entity types in a relationship type ISA relationship types Weak Entity Types – identifying relationship type, identifying entity type