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.

Slides:



Advertisements
Similar presentations
Week 5 Relational Database Design by ER- -to-Relational Mapping.
Advertisements

Advanced Database: Seminar # 12: Object-Oriented Databases1 Object Oriented Databases Seminar 12 Exploring ODMG - OQL Using Lambda-DB.
Systems Development Life Cycle
ODMG Standard: Object Model1 OBJECT-ORIENTED DATABASE SYSTEMS ODMG Standard: Object Model Susan D. Urban and Suzanne W. Dietrich Department of Computer.
Database Design (Data Modeling) DCO11310 Database Systems and Design By Rose Chang.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Conceptual Models Agenda - Steps in the design of a DB - Need for conceptual models - The Entity-Relationship Model (ER-Model)
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Week 3 Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model.
Object Oriented Databases - Overview
Seminar #1 – Refreshing databases concepts and SQL CM036: Advanced Databases1 Seminar 1: Revisiting Databases and SQL Purpose To refresh basic concepts.
1 ODB Design Handling Associations in ODL M. Akhtar Ali School of Informatics.
Object-Oriented Database Design using UML and ODMG
EER vs. UML Terminology EER Diagram Entity Type Entity Attribute
1 ODB Design: Handling Associations and Inheritance in ODL M. Akhtar Ali School of Informatics.
CS 405G Introduction to Database Systems
Seminar #3 CM036: Advanced Databases1 Seminar 4: Relational Algebra and its Simulation using SQL Purpose To understand how the relational operations are.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
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.
Chapter 13 (Online): Object-Oriented Databases
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.
SQL Structured Query Language Programming Course.
Database Management COP4540, SCS, FIU Database Modeling A Introduction to object definition language (ODL)
How to build ER diagrams
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
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:
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
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.
11-1 CHAPTER 11 Concepts for Object-Oriented Databases.
Essential Databases The simple truth!. What’s a database? A system which helps with –storage –retrieval in an efficient manner –assume large volumes of.
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.
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.
Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 1 Seminar 10a : OODB Design Purpose This seminar is the continuation of seminar.
1 ODB Design Handling Inheritance in ODL M. Akhtar Ali School of Informatics.
Seminar #6 CG096 Advanced Database Technologies1 Advanced Databases Seminar 6: Implementing Relational Algebra Data Model using SQL.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
Example COMPANY Database
Object-Oriented Databases (chapter 3/3) ODMG-OQL for querying the database Simple OQL Queries, Retrieving Objects – an example Database Entry Points Retrieving.
Lecture # 14 Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
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
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
Appendix D: Network Model
Seminar 9: OODB Design (Self Study)
Entity-Relationship Modeling "Extended"
ISC321 Database Systems I Chapter 10: Object and Object-Relational Databases: Concepts, Models, Languages, and Standards Spring 2015 Dr. Abdullah Almutairi.
ODB Design: Handling Associations and Inheritance in ODL
Relational Database Design by ER- and EER-to-Relational Mapping
Chapter 15: Object-Oriented Database Development
Entity-Relationship Modeling "Extended"
Entity-Relationship Modeling "Extended"
Relational Database Design by ER-to-Relational Mapping
Presentation transcript:

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 structured. How a class diagram in UML is mapped onto an ODL schema. How a relational mapping of a UML class diagram can be compared with an object-oriented representation. 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 and a sample relational database shown in Figure 3 (at the end of handout). It is assumed that the students understand UML notations and are familiar with relational concepts.

Seminar #: 9 (Object Oriented Database Schema in ODL) Advanced Databases (CM036) 2 Conceptual model for Company database Figure 1

Seminar #: 9 (Object Oriented Database Schema in ODL) Advanced Databases (CM036) 3 Company Relational DB Schema Figure 2

Seminar #: 9 (Object Oriented Database Schema in ODL) 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 #: 9 (Object Oriented Database Schema in ODL) 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). This aspect of the design will be addressed in next lecture/seminar. 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 #: 9 (Object Oriented Database Schema in ODL) Advanced Databases (CM036) 6 Using ODL Use short data type for int or integer. 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 #: 9 (Object Oriented Database Schema in ODL) Advanced Databases (CM036) 7 Using Lambda-DB Open a DOS window. Then Connect to Jaguar by telnet jaguar.unn.ac.uk Connect to cgapp2 using your Unix user account and password by writing telnet cgapp2 on the Jaguar prompt. From now on every thing you type is case-sensitive. Run the script for setting up seminar6 files by /home/makhtarali/CM036/setupSem6 Go to the folder seminar6 by cd CM036/seminar6 Open the file seminar6.odl and complete the schema by pico seminar6.odl. Save by Ctrl + x. Once ready, compile the schema by make build and make If the compiler reports errors open seminar6.odl and go to the specific line by Ctrl + w then Ctrl + t. Save and recompile (by make ) until all errors are removed.

Seminar #: 9 (Object Oriented Database Schema in ODL) Advanced Databases (CM036) 8 Tasks for the Seminar It is assumed that you understand what the UML notations stand for and how they are mapped onto relational model. The UML conceptual model is provided to give you an idea of how the relational model came into existence in the first place. Complete implementation of the UML class diagram as an OO schema using ODL. A start-up schema (seminar6.odl) is available from blackboard and on the Linux server. Concentrate on representing classes with their attributes and operations. Leave associations and association classes for the next seminar. Implementation of the UNN_IS1 schema in ODL is given for your guidance and is available from blackboard.

Seminar #: 9 (Object Oriented Database Schema in ODL) Advanced Databases (CM036) 9 Sample Company Database (relational) Figure 3