Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 1 Seminar 10a : OODB Design Purpose This seminar is the continuation of seminar.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

Advanced Database: Seminar # 12: Object-Oriented Databases1 Object Oriented Databases Seminar 12 Exploring ODMG - OQL Using Lambda-DB.
ODMG Standard: Object Model1 OBJECT-ORIENTED DATABASE SYSTEMS ODMG Standard: Object Model Susan D. Urban and Suzanne W. Dietrich Department of Computer.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2004 Pearson Education, Inc.. Chapter 3 Data Modeling Using the Entity-Relationship Model.
Object Oriented Databases - Overview
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Reduction of an E-R Schema to Tables A database which conforms to an E-R diagram can be represented.
1 ODB Design Handling Associations in ODL M. Akhtar Ali School of Informatics.
Object-Oriented Database Design using UML and ODMG
1 ODB Design: Handling Associations and Inheritance in ODL M. Akhtar Ali School of Informatics.
CS 405G Introduction to Database Systems
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
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.
ICOM 5016 – Introduction to Database Systems Lecture 4 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
Seminar #: 9 (Object Oriented Database Schema in ODL) Advanced Databases (CM036) 1 Seminar 9 : OODB Schema in ODL Purpose To understand how an OODB is.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
SQL Structured Query Language Programming Course.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
How to build ER diagrams
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
IS 230Lecture 4Slide 1 Entity Relationship to Relational Model Mapping Lecture 5.
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 7 Data Modeling with Entity Relationship Diagrams
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
ICOM 5016 – Introduction to Database Systems Lecture 9 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
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.
Slide Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan Lecture-03 Introduction –Data Models Lectured by, Jesmin Akhter.
Seminar 10: OODB Design (Self-Study)
Chapter 2 Data Modeling Using the Entity-Relationship (ER) Model Copyright © 2004 Pearson Education, Inc.
Seminar #: 10 (Object Oriented Database Design) Advanced DB Technologies (CG096) 1 Seminar 10 : OODB Design Purpose To understand how an OODB is structured.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Chapter 4 Extended Entity-Relationship (EER)Model Incorporates Set-subset Relationships Incorporates Generalization Hierarchies Constraints: Coverage Constraints:
The Entity-Relationship Model CIS 4301 Lecture Notes 1/12/2006.
The ODMG Standard for Object Databases
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
1 ODB Design Handling Inheritance in ODL M. Akhtar Ali School of Informatics.
Kyung Hee University Class Diagramming Notation OOSD 담당조교 석사과정 이정환.
1 CS 430 Database Theory Winter 2005 Lecture 3: A Fifty Minute Introduction to Data Modeling.
Example COMPANY Database
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Lecture # 16 July 26,2012 Data Modeling using the Entity Relationship.
Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping Copyright © 2004 Pearson Education, Inc.
Data Modeling Using the Entity- Relationship (ER) Model
Comp 1100 Entity-Relationship (ER) Model
Data Modeling Using the Entity- Relationship (ER) Model
Entity- Relationship (ER) Model
Chapter 9 Domain Models.
Seminar 10 : OODB Design (Self-Study)
Seminar 6 : OODB Schema in ODL
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
بسم الله الرحمن الرحيم.
Translation of ER-diagram into Relational Schema
Seminar 9: OODB Design (Self Study)
Entity-Relationship Modeling "Extended"
Session 2 Welcome: The seventh learning sequence
ODB Design: Handling Associations and Inheritance in ODL
Relational Database Design by ER- and EER-to-Relational Mapping
Entity-Relationship Modeling "Extended"
Entity-Relationship Modeling "Extended"
Relational Database Design by ER-to-Relational Mapping
Presentation transcript:

Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 1 Seminar 10a : OODB Design Purpose This seminar is the continuation of seminar 6. How different UML associations are implemented in ODL. Scenario A UML class diagram of a Company database is given in Figure 1, which shows a conceptual model of the database. Company database models the data for a company that has several departments, many employees work for departments on different projects. The database also stores data on employee’s dependents. A mapping of the conceptual model into relational model is given in Figure 2. It is assumed that the students understand UML notations and are familiar with relational concepts.

Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 2 Conceptual model for Company database Figure 1

Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 3 Company Relational DB Schema Figure 2

Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 4 Relational Schema Relationships are implemented using foreign keys. See arrows (  ) from foreign keys to the primary keys. Many-to-many relationships are implemented as a linking relation using primary keys of participating relations (see WORKS_ON relation). The real-world concept that an instance of one entity is associated with one or many instances of another entity is not present in relational model. For example, the concept that a department has many employees working for it is not present in the model. The only thing that exist is that an employee has an extra attribute (DNO) that holds the primary key value of his/her department. Multi-valued attributes are implemented as a separate relation (e.g., DEPT_LOCATIONS). Composite attributes (e.g. Name) is implemented in terms of its components (e.g., Fname, Minit, Lname).

Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 5 Object Oriented Database Design Fundamental Principles All kinds of relationships are implemented directly using either single valued or multi-valued attributes in both participating entities (classes). Multi-valued attributes are implemented as collection valued attributes (e.g., set, bag, list). Composite attributes are implemented directly (i.e., struct). Primary keys are not required but supported for their usefulness in query processing. Value-based foreign keys are not present ODBs. The data type of attributes can be primitive (e.g., short, float, string, etc) as well as constructed types and collections (e.g., Department, Employee, set, etc).

Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 6 Using ODL Use short data type for int or integer and also where unsigned short may be the ideal choice as lambda- DB complaints about unsigned short when used as attribute. Follow these guidelines when using ODL with lambda-DB due to some limitations: Use short data type for operations that return boolean or unsigned short. Use string data type where char applies. Define a composite literal type (using struct ) and use it where date applies. For example, if you are going to define an attribute: attribute date birthDate; then define date_type as a literal (i.e., struct ) first and then write: attribute date_type birthDate;

Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 7 Using Lambda-DB Open a DOS window. Connect to cgapp1 using your Unix user account and password by writing telnet cgapp2 on the Linux prompt. From now on every thing you type is case-sensitive. If completed Seminar 6 (last week) then carry on with the tasks of this seminar (by editing seminar6.odl to add relationships). Otherwise run the script for setting up seminar7a files by /home/makhtarali/CM036/setupSem7 The solution of Seminar 6 is available online. Go to the folder seminar 7a by cd CM036/seminar7 Open the file seminar7.odl and complete the schema by pico seminar7.odl. Save by Ctrl + x. Once ready, compile the schema by make (note if you were not in last week or you did not run make build before, then run make build before you compile schema by make) If the compiler reports errors open seminar7.odl and go to the specific line by Ctrl + w then Ctrl + t. Save and recompile (by make ) until all errors are removed.

Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 8 Tasks for the Seminar It is assumed that you have either completed seminar 6 or you have copied the files of seminar 10 to start with. Using the implementation of different kinds of associations in ODL (described in the Lecture 10), implement the various associations given in Figure 1 using ODL.