Database Design with Semantic Object Models zMapping 7 types of semantic objects into relations.

Slides:



Advertisements
Similar presentations
Database Fundamentals
Advertisements

Convert ER to Relational Database Entity relation Entity relation Attributes attributes Attributes attributes Primary key primary key Primary key primary.
Chapter 6: Entity-Relationship Model (part I)
Database Lecture Notes Mapping ER Diagrams to Tables 2 Dr. Meg Murray
(wrapping up from last week)
Database Design Chapter Five DATABASE CONCEPTS, 6th Edition
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 5/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 8.
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke Database Processing Chapter 6 Transforming Data.
Entity-Relationship Model and Diagrams (continued)
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 COS 346 Day 10.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 COS 346 Day 8.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 COS 346 Day 7.
Chapter Five Data Modeling with the Entity-Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database.
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming ER Models into Database.
Chapter Five Data Modeling with the Entity-Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming ER Models into Database.
Entity Relationships. Relationships Relationships exist between entities The type of relationship is entirely dependent on the business rules The business.
Mapping ERM to relational database
Database Design.  Define a table for each entity  Give the table the same name as the entity  Make the primary key the same as the identifier of the.
CONCEPTS OF E-R MODEL. CONTENTS Entity Attributes Data Value Entity Types Types of Entity Types Relationships Relationship Constraints.
Chapter 5 1 © Prentice Hall, 2002 Chapter 5: Transforming EER Diagrams into Relations Mapping Regular Entities to Relations 1. Simple attributes: E-R attributes.
Converting ER model Into Relational Table
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 5-1 Chapter Objectives Learn how to transform E-R data models into relational.
Chapter Six Professor Adams’ Slides. Note that entities are shadowed, tables are not. Note that entities have no physical existence (blueprint) Note.
Chapter 5 Entity–Relationship Modeling
Conversion from ER diagram to relational model
Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 3/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Fundamentals of Relational Database Operations
Database Design IST210 Class Lecture
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Customer Order Order Number Date Cust ID Last Name First Name State Amount Tax Rate Product 1 ID Product 1 Description Product 1 Quantity Product 2 ID.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 4 Mapping an ER model to tables © Akhilesh Bajaj,
CS 370 Database Systems Lecture 9 The Relational model.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
3 & 4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
1 CS 430 Database Theory Winter 2005 Lecture 15: How to Convert an ER Model to Relations.
Database Design With Semantic Object Models
Chapter 4 The Semantic Object Model David M. Kroenke Database Processing © 2000 Prentice Hall.
Data modeling using ER1 Entity relationship diagrams.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
Fundamentals, Design, and Implementation, 9/e Appendix B The Semantic Object Model.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
Mapping ER to Relational Model Each strong entity set becomes a table. Each weak entity set also becomes a table by adding primary key of owner entity.
Conversion from ER diagram to relational model 1 ER is a visual model The relational model is a matemathical model.
1 Storing and Maintaining Semistructured Data Efficiently in an Object- Relational Database Mo Yuanying and Ling Tok Wang.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Appendix H: The Semantic Object Model.
Chapter 5 Database Design
Chapter 4: Part B Logical Database Design and the Relational Model
Database Design Chapter Five DATABASE CONCEPTS, 4th Edition
Entity-Relationship Model
Database Design with Semantic Object Models
COS 346 Day 8.
Entity-Relationship Model and Diagrams (continued)
Software : TableDesigner
Semantic Objects.
The Relational Model Textbook /7/2018.
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Database Processing: David M. Kroenke’s Chapter Six:
Presentation transcript:

Database Design with Semantic Object Models zMapping 7 types of semantic objects into relations

Simple objects zTransform object into relation zMake ID into key zOther attributes become columns

Composite objects zOne relation for base object yInclude single-valued attributes zOne relation for each (simple or group) multi- valued attribute zKey of child relation is composite: yForeign key of object yLocal key of multi- valued attribute

Separate versus nested groups zIterate composite object procedure zOuter group is base object for inner group

Compound objects zBasically 3 types of binary relationships

Compound objects z1:1 - place key of either table into other table

Compound objects z1:N - place key of parent into child table

Compound objects zN:M - create intersection table with keys of both relations

Hybrid objects zCreate a table for the multi-valued group attribute of the composite object zPlace key of non-composite object into that table SALES-ORDER (SalesOrderNumber, Date, Subtotal, Tax, Total, Phone, SalespersonName) ITEM (ItemNumber, ItemDescription, UnitPrice) LINE-ITEM (SalesOrderNumber, ItemNumber, Quantity, ExtendedPrice)

Hybrid objects zActually, 4 cases of hybrid objects

Hybrid Object Max Cardinality zCase One zITEM in one ORDER and only one LineItem

Hybrid Object Max Cardinality zCase Two zITEM in one or more LineItems within one SALES-ORDER

Hybrid Object Max Cardinality zCase Three zITEM in one LineItem within one SALES- ORDER

Hybrid Object Max Cardinality zCase Four zITEM in one or more LineItems within one SALES-ORDER

Hybrid object common cases zCase 4: O3 is inserted into R-G2 but not as part of its local key zCase 1: like 3 but add O1 to R2 and R2(O1,O2) = R-G1(O1,O2)  Case 2: like 4 but add O1 to R3 and R-G2(O1,O3)  R3(O1,O3)

Association objects zOne relation for each of the 3 participating objects yEach relation has its own key yAssociation relation has parents’ keys as foreign keys yIf association has no unique ID, use foreign keys zUnlike intersection relations, association tables may have additional attributes

Super/subtype objects zOne table for parent zOne table for each subtype zNormally same key for all zMay add subtype attribute(s) to parent for efficiency yOne label if exclusive yOne Boolean per type, if not exclusive

Archetype/version objects zOne table for archetype zOne table for version zKey of version table contains key of archetype table