Chapter 21 B Mapping to ODL Copyright © 2004 Pearson Education, Inc.

Slides:



Advertisements
Similar presentations
3/25/2017.
Advertisements

Jane Reid, BSc/IT DB, QMUL, 25/2/02 1 Object-oriented DBMS Background to ODBMS ODBMS requirements Object components ODB conceptual design –Graphical ODB.
Relational Database Design Via ER Modelling
© Shamkant B. Navathe CC. © Shamkant B. Navathe CC Chapter 4 - Part I Enhanced Entity-Relationship and UML Modeling Copyright © 2004 Ramez Elmasri and.
1 Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – EER Model –21th June.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 7- 1.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 7- 1.
Copyright © 2004 Pearson Education, Inc.. Chapter 4 Enhanced Entity- Relationship and UML Modeling.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Conceptual Data Modeling Using Entities and Relationships.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 4 Enhanced Entity-Relationship (EER) Modeling.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 7 Relational Database Design by ER- and EER-to-Relational Mapping.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 7 Relational Database Design by ER- Mapping.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- and EER-to- Relational Mapping.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- and EER-to- Relational Mapping.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
Chapter 7 Relational Database Design by ER- and EER-to-Relational Mapping Copyright © 2004 Pearson Education, Inc.
Chapter 8 Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1 EER stands for Enhanced ER or Extended ER EER Model Concepts Includes all modeling concepts.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Chapter 91 ER & EER to Relational Mapping. Chapter 92 ER to Relational Mapping Step 1: For each regular entity type E in the ER schema, create a relation.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- and EER-to-Relational Mapping.
ER- and EER-to-Relational Mapping
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 7- 1.
Chapter 21 A Object Data Model - Intro Copyright © 2004 Pearson Education, Inc.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) 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.
Relational Database Design by ER- and EER-to- Relational Mapping
Chapter 4 Functional Dependencies and Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
© Shamkant B. Navathe CC. © Shamkant B. Navathe CC Chapter 4 - Part I Enhanced Entity-Relationship and UML Modeling Copyright © 2004 Ramez Elmasri and.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- and EER-to- Relational Mapping.
METU Department of Computer Eng Ceng 302 Introduction to DBMS Relational Database Design by ER to Relational Mapping by Pinar Senkul resources: mostly.
Copyright © 2004 Pearson Education, Inc.. Chapter 21 Object Database Standards, Languages, and Design.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Data Modeling Using the Entity-Relationship (ER) Data Model (Based on Chapter 3 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
Chapter 6 Relational Database Design by ER- and EERR-to-Relational Mapping Copyright © 2004 Pearson Education, Inc.
Relational Database Design by ER- and EER-to-Relational Mapping The main reference of this presentation is the textbook and PPT from : Elmasri & Navathe,
DatabaseIM ISU1 Chapter 7 ER- and EER-to-Relational Mapping Fundamentals of Database Systems.
ER/EER to Relational Mapping Chapter 9. STEP 1 ENTITY TYPE E (non weak) -> NEW RELATION T RELATION T: – includes all simple attributes (non composite,
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Copyright © 2004 Ramez Elmasri and Shamkant Navathe Enhanced-ER (EER) Model Concepts.
ER-TO-RELATIONAL MODEL MAPPING CONTENT SOURCES: ELAMSARI AND NAVATHE, FUNDAMENTALS OF DATABASE MANAGEMENT SYSTEMS.
© Shamkant B. Navathe CC Enhanced Entity-Relationship Copyright © 2004 Ramez Elmasri and Shamkant Navathe.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe CHAPTER 9 Relational Database Design by ER- and EERR-to-Relational Mapping Slide 9- 1.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 7- 1.
ER- Relational Mapping (Based on Chapter 9 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
Relational Database Design by ER- and EER-to-Relational Mapping
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database.
Relational Database Design by ER- and EER-to-Relational Mapping
Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- and EER- to-Relational Mapping.
Chapter 21 Object Database Standards, Languages, and Design Copyright © 2004 Pearson Education, Inc.
Databases (CS507) CHAPTER 8
Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping Copyright © 2004 Pearson Education, Inc.
Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping Copyright © 2004 Pearson Education, Inc.
Relational Database Design by ER- and ERR-to-Relational Mapping
Entity- Relationship (ER) Model
Relational Database Design by ER- and EER-to- Relational Mapping
ER- and EER-to-Relational
9/5/2018.
Chapter 12 Outline Overview of Object Database Concepts
11/15/2018.
ISC321 Database Systems I Chapter 10: Object and Object-Relational Databases: Concepts, Models, Languages, and Standards Spring 2015 Dr. Abdullah Almutairi.
Relational Database Design by ER- and EER-to- Relational Mapping
4/11/2019.
7/19/2019.
Presentation transcript:

Chapter 21 B Mapping to ODL Copyright © 2004 Pearson Education, Inc.

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-3 Chapter 21Outline 21.5 Object Database Conceptual Model

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter Object Database Conceptual Design Object Database (ODB) vs Relational Database (RDB) –Relationships are handled differently –Inheritance is handled differently –Operations in ODB are expressed early on since they are a part of the class specification

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-5 Relationships: ODB vs RDB (1) Relationships in ODB: –relationships are handled by reference attributes that include OIDs of related objects –single and collection of references are allowed –references for binary relationships can be expressed in single direction (using an object-valued attribute) or both directions (via inverse operator)

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-6 Relationships: ODB vs RDB (2) Relationships in RDB: –Relationships among tuples are specified by attributes with matching values (via foreign keys) –Foreign keys are single-valued –M:N relationships must be presented via a separate relation (table)

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-7 Inheritance Relationship in ODB vs RDB Inheritance structures are built in ODB (and achieved via “:” and extends operators) RDB has no built-in support for inheritance relationships; there are several options for mapping inheritance relationships in an RDB (see Chapter 7)

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-8 Early Specification of Operations Another major difference between ODB and RDB is the specification of operations –ODB: operations specified during design (as part of class specification) –RDB: may be delayed until implementation

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-9 Mapping EER Schemas to ODB Schemas Mapping EER schemas into ODB schemas is relatively simple especially since ODB schemas provide support for inheritance relationships Once mapping has been completed, operations must be added to ODB schemas since EER schemas do not include an specification of operations

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter Mapping EER to ODB Schemas Step 1 Create an ODL class for each EER entity type or subclass –Multi-valued attributes are declared by sets, bags or lists constructors –Composite attributes are mapped into tuple constructors

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter Mapping EER to ODB Schemas Step 2 Add relationship properties or reference attributes for each binary relationship into the ODL classes participating in the relationship –Relationship cardinality: single-valued for 1:1 and N:1 directions; set-valued for 1:N and M:N directions –Relationship attributes: create class for the relationship, with N:1 relationships to both sides

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter Mapping EER to ODB Schemas Step 3 Add appropriate operations for each class –Operations are not available from the EER schemas; original requirements must be reviewed –Corresponding constructor and destructor operations must also be added

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter Mapping EER to ODB Schemas Step 4 Specify inheritance relationships via extends clause –An ODL class that corresponds to a sub- class in the EER schema inherits the types and methods of its super-class in the ODL schemas –Other attributes of a sub-class are added by following Steps 1-3

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter Mapping EER to ODB Schemas Step 5 Map weak entity types in the same way as regular entities –Weak entities that do not participate in any relationships may alternatively be presented as composite multi-valued attribute of the owner entity type

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter Mapping EER to ODB Schemas Step 6 Map categories (union types) to ODL –The process is not straightforward –May follow the same mapping used for EER-to-relational mapping: Declare a class to represent the category Define 1:1 relationships between the category and each of its super-classes

Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter Mapping EER to ODB Schemas Step 7 Map n-ary relationships whose degree is greater than 2 –Each relationship is mapped into a separate class with appropriate reference to each participating class