1 Advanced Databases – Lecture # 11 Object-Oriented Databases Advanced Databases Object Oriented Databases School of Informatics Akhtar Ali.

Slides:



Advertisements
Similar presentations
OO databases 1 Object Oriented databases. OO databases 2 Developing OODBMS - motivation motivation more and more application areas require systems that.
Advertisements

Chapter 10: Designing Databases
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.
Introduction to Databases
Databases CIS 422. Lifetime of Data Transient results to the evaluations of expression Variables involved in procedure activation Global variables Dynamically.
ODMG Standard: Object Model1 OBJECT-ORIENTED DATABASE SYSTEMS ODMG Standard: Object Model Susan D. Urban and Suzanne W. Dietrich Department of Computer.
Object-Oriented Databases v OO systems associated with – graphical user interface (GUI) – powerful modeling techniques – advanced data management capabilities.
Chapter Object-Oriented Practices. Agenda Object-Oriented Concepts Terminology Object-Oriented Modeling Tips Object-Oriented Data Models and DBMSs.
OBJECTS Object Oriented ???????. OBJECTS Object-Oriented n OO convenient label for a collection of interconnected ideas n OO approach views computer.
File Systems and Databases
OBJECT-ORIENTED DBMS. Structured & Object Oriented Approaches Structured approach – long history, well- documented  ERD - modeling data  DFD - modeling.
1 Database Systems (Part I) Introduction to Databases I Overview  Objectives of this lecture.  History and Evolution of Databases.  Basic Terms in Database.
Object-Oriented Databases
Introduction to Databases
Object Oriented Databases - Overview
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
Object-Oriented Methods: Database Technology An introduction.
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
Advanced Database CS-426 Week 13 – Object Relational Databases.
Chapter 4 Object and Object-Relational Databases (Part ½: Object-Oriented Concepts) Lecturer: H.Ben Othmen Department of Computer Science, Umm Al-Qura.
Object-Oriented Database Design using UML and ODMG
EER vs. UML Terminology EER Diagram Entity Type Entity Attribute
Chapter 14: Object-Oriented Data Modeling
IST Databases and DBMSs Todd S. Bacastow January 2005.
Object and object-relational databases 1. Object databases vs. Object-relational databases Object databases Stores complex objects – Data + functions.
Chapter 24 Introduction to Object DBMSs Prepared by Kai Huang CS157B Prof Sin-Min Lee.
Week 1 Lecture MSCD 600 Database Architecture Samuel ConnSamuel Conn, Asst. Professor Suggestions for using the Lecture Slides.
Introduction to the Other Databases
Object Query Language (OQL) and Language Binding
DBSQL 10-1 Copyright © Genetic Computer School 2009 Chapter 10 Object-Oriented Based DBMS.
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
Geog 495 GIS Database Design Midterm review. Outlines 1.Database Concepts 2.Relational Database 3.Object-oriented Database 4.Entity-Relationship Diagram.
Database Design - Lecture 2
Database Systems: Design, Implementation, and Management Ninth Edition
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
E.Bertino, L.Matino Object-Oriented Database Systems 1 Chapter.1 Introduction Seoul National University Department. of Computer Engineering OOPSLA Lab.
1 Object Databases: Introduction. 2 Why OO? v Relational Systems are limited: –Structural restrictions on data –Missing semantics (value-based relationships)
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
11 1 Chapter 11 Object Oriented Databases Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
1 CS 430 Database Theory Winter 2005 Lecture 17: Objects, XML, and DBMSs.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Chapter 12: Designing Databases
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
1 Advanced Databases (CM036) – Lecture # 12: The ODMG Standard for Object Databases Object Query Language (OQL) & Language Binding Advanced Database Technologies.
FEN NOEA/IT - Databases/ODB1 ODB – Object DataBases Object-Oriented – Fundamental Concepts UML and EE/R OO and Relational Databases Introduction.
1 CS457 Object-Oriented Databases Chapters as reference.
CSE 6331 © Leonidas Fegaras OODB1 Object-Oriented Databases and the ODMG Standard.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
OODBMS: Introduction and Logical Database Design
Object Oriented Database By Ashish Kaul References from Professor Lee’s presentations and the Web.
The ODMG Standard for Object Databases
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
The Object-Oriented Database System Manifesto Malcolm Atkinson, François Bancilhon, David deWitt, Klaus Dittrich, David Maier, Stanley Zdonik DOOD'89,
1 Advanced Databases – Lecture # 12: The ODMG Standard for Object Databases Advanced Databases The ODMG Standard for Object Databases.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database.
1 ODMG: ODL and OQL This lecture is a short version of: Lecture 11 (on ODL) & Lecture 12 (on OQL) M. Akhtar Ali School of Informatics.
Faeez, Franz & Syamim.   Database – collection of persistent data  Database Management System (DBMS) – software system that supports creation, population,
OODBMS and ORDBMS. Background Object-oriented software, based on the principles of user-defined datatypes, along with inheritance and polymorphism, is.
Data Models. 2 The Importance of Data Models Data models –Relatively simple representations, usually graphical, of complex real-world data structures.
Relational vs. Object Oriented Database Management System Syazwani Nur Dayana Nur Fatin Syafiqa M3cs2305B.
Introduction: Databases and Database Systems Lecture # 1 June 19,2012 National University of Computer and Emerging Sciences.
Completeness Criteria for Object- Relational Database Systems by Won Kim April 2002 Sang Ho Lee School of Computing, Soongsil University
Object-Oriented Databases (chapter 2/3) Object Persistence - Introduction Persistent Programming Languages Specifying Object Persistence via Naming and.
Databases and DBMSs Todd S. Bacastow January
Object-Oriented Databases and the ODMG Standard
Advanced Databases Object Oriented Databases
OBJECTS & DATABASES Arnaud Sahuguet – CIS-550.
Presentation transcript:

1 Advanced Databases – Lecture # 11 Object-Oriented Databases Advanced Databases Object Oriented Databases School of Informatics Akhtar Ali

2 Advanced Databases – Lecture # 11 Object-Oriented Databases References Barry Eaglestone, Mick Ridley, Object Databases: An Introduction, McGraw-Hill, 1998 R.G.G. Cattell, Douglas K. Barry. Object Database Standard: ODMG 3.0. Morgan Kaufmann Publishers, Inc Richard Cooper, Object Databases: An ODMG Approach, ITCP 1997 R. Elmasri and S. B. Navate, Fundamental of Database Systems – 3 rd Edition, 2000, Chapter 11 & 12

3 Advanced Databases – Lecture # 11 Object-Oriented Databases Object Oriented Concepts Object –An object represents a real world entity (Person), a concept (Drama), a logical thing (Licence), a physical thing (Car) –Every object has a unique Object Identifier (OID) –An object is made of two things: State: properties (name, address, birthDate of a Person) Behaviour: operations (age of a Person is computed from birthDate and current date) Object Identifier –Unique for every object –System generated –Never changes in the lifetime of the object –Not visible to the user

4 Advanced Databases – Lecture # 11 Object-Oriented Databases OO Concepts – continued Classification –Classification is the process of grouping together objects which have common features. –Programming languages have type systems and database systems have data models to classify object. –The name used for the classificatory group of values is usually either class or type. class Person properties name: String address: String birthDate: Date operations age(): Integer end Person

5 Advanced Databases – Lecture # 11 Object-Oriented Databases OO Concepts – continued Encapsulation –The integration of the description of data structure and operation is called encapsulation. Objects are composed of properties (values) and operations. –It introduces a component of computation into the data. –This feature is missing in Relational Databases (RDBs) and is usually coded into the application. Inheritance –A new class is usually described in terms of one or more previously defined classes from which the new class takes (inherits) properties and operations. For instance, the following defines a new class Student: class Student ISA Person properties major: String tutor: Lecturer operations register(C: Course): Boolean end Student Student is sub-type of Person Person is super-type of Student A Student is also a Person, but not every Person is a Student. A Student has all the properties and operations same as Person

6 Advanced Databases – Lecture # 11 Object-Oriented Databases OO Concepts – continued An object system or object-based system is one which supports the modeling of data as abstract entities, with object identity. An object-oriented system is an object system in which all data is created as instances of classes which take part in an inheritance hierarchy. An object-oriented database management system (OODBMS) is a DBMS with an object-oriented logical data model. An object-oriented database is a database made up of objects and managed by an OODBMS.

7 Advanced Databases – Lecture # 11 Object-Oriented Databases Why Object Oriented Databases? Object Oriented Databases (OODBs) are inevitable when: –Data is complex and variable in size –Complex structural and compositional relationships –Data is highly inter-related –Data is evolving rapidly over time –Richer data types complex objects inheritance user extensibility –Behaviour with data not just a data model but also operations can be bundled together with data

8 Advanced Databases – Lecture # 11 Object-Oriented Databases Complex Data

9 Advanced Databases – Lecture # 11 Object-Oriented Databases OODBs are more Natural & Direct

10 Advanced Databases – Lecture # 11 Object-Oriented Databases An Example Conceptual Schema in ER Person StudentLecturer DepartmentCourseUnit tutor N N1 enrolledOn 1 offers N1 worksFor N 1 partOf NM takes d N M teaches M N Student and Lecturer are sub-types of Person. ‘d’ means that Student and Lecturer are disjoint. A Student cannot be a Lecturer at the same time and vice versa. Attribute names are omitted.

11 Advanced Databases – Lecture # 11 Object-Oriented Databases The Conceptual Schema in UML

12 Advanced Databases – Lecture # 11 Object-Oriented Databases OO Representation class Course properties name: String offeredBy: Department hasStudents: set(Student) hasUnits: set(Unit) end Course class Student ISA Person properties major: String tutor: Lecturer enrolledOn: Course takes: set(Unit) operations register(C: Course): Boolean takeUnit(U: Unit): Boolean end Student class Lecturer ISA Person properties room: Integer tutees: set(Student) worksFor: Department teaches: set(Unit) operations teachUnit(U: Unit): Boolean end Lecturer class Person properties name: String address: String birthDate: Date operations age(): Integer end Person class Department properties name: String staff: set(Lecturer) offers: set(Course) end Department class Unit properties name: String code: String takenBy: set(Student) taughtBy: set(Lecturer) partOf: set(Course) end Unit

13 Advanced Databases – Lecture # 11 Object-Oriented Databases OO Representation – continued No primary keys are required, but keys can be used. Relationships are represented in a clear manner, no foreign keys used as in case of RDBs. e.g. –As in Lecturer class worksFor: Department teaches: set(Unit) worksFor is not a foreign key but an OID of a Department object. teaches is collection valued i.e. a set of OIDs of Unit objects. Relationships are bi-directional in the natural way. –As in Department class staff: set(Lecturer) staff is a set of OIDs of Lecturer objects, which is inverse to worksFor in Lecturer class. Many-to-many relationships are represented directly without introducing a new class or relation as in the case of takes, partOf, and teaches relationships.

14 Advanced Databases – Lecture # 11 Object-Oriented Databases Comparison RDBs vs. ORDBs –Very easy to compare because both are based on Relational Model. –An RDB does not support abstract data types (ADT), all attribute values must be atomic and relations must be in first normal form (flat relation). –An ORDB supports ADTs, attributes can be multi-valued, and does not require first normal form. –The underlying basic data structures of RDBs are much simpler but less versatile than ORDBs. –Optimization of queries is much easier and efficient in RDBs compared to ORDBs. But this does not mean that RDBs are faster than ORDBs. –ORDBs support complex data whereas RDBs don’t. –ORDBs support wide range of applications.

15 Advanced Databases – Lecture # 11 Object-Oriented Databases Comparison – continued… RDBs vs. OODBs. –Not very easy to compare because of philosophical differences. –RDBs have only one construct i.e. Relation, whereas the type system of OODBs is much richer and complex. –RDBs require primary keys and foreign keys for implementing relationships, OODBs simply don’t. –Optimization of queries in OODBs is much complex than RDBs, but is mainly inspired from the Optimization techniques in RDBs. –OODBs support complex data whereas RDBs don’t. –OODBs support wide range of applications. –OODBs are much faster than RDBs but are less mature to handle large volumes of data. –There is more acceptance and domination of RDBs in the market than that for OODBs.

16 Advanced Databases – Lecture # 11 Object-Oriented Databases Comparison – continued… OODBs vs. ORDBs. –Both support ADTs, collections, OIDs, and inheritance, though philosophically quite different. –ORDBs extended RDBs whereas OODBs add persistence and database capabilities to OO languages. –Both support query languages for manipulating collections and nested and complex data. –SQL3 is inspired from OO concepts and is converging towards OQL (object query language). –ORDBs carries all the benefits of RDBs, whereas OODBs are less benefited from the technology of RDBs. –OODBs are seamlessly integrated with OOPLs with less mismatch in the type systems; –ORDBs (SQL3) have quite different constructs than those of OOPLs when used in embedded form.

17 Advanced Databases – Lecture # 11 Object-Oriented Databases Advantages of OODB Greater semantic expressibility: storing and manipulating complex objects greatly simplifies the model of the application world Object identity is superior unifying concept than using surrogates (e.g. primary and foreign keys in relational DBMS) The ease of user extensibility Behavioural model: programs and data are stored together, unifying conceptually connected features of database Typing objects provides a more coherent structure for the database Code re-use through inheritance, over-riding and late binding A possible pre-requisite to active databases and interoperability?

18 Advanced Databases – Lecture # 11 Object-Oriented Databases Disadvantages of OODB No formal semantics, unlike the relational data model. Pure OO systems do not include the notion of class extents which is of fundamental importance in DB management. Design methods must be evolved to include behaviour and support for dynamic processes. Loss of the relational data model’s simplicity. Optimization / tuning(e.g. indexes) not as well understood and are difficult; the overall record-at-a-time flavour of the OO systems means that relational-style optimization is unlikely. Transaction management support is not very mature.

19 Advanced Databases – Lecture # 11 Object-Oriented Databases Current Myths [Won Kim 95] OODBs are 10 to 100 times faster than RDBs. OODBs eliminate the need for joins (not altogether). Object identity eliminates the need for keys. OODBs eliminate the need for a non-procedural database language (not in reality). Query processing will violate encapsulation (may or may not). OODBs can support versioning and long duration transactions. OODBs support multimedia data.

20 Advanced Databases – Lecture # 11 Object-Oriented Databases OODBMS Features Object data model –object identifiers, type inheritance, methods, complex objects Integration with an OO programming language –transparent or semi-transparent retrieval and storage of objects Declarative query language –usually an SQL like syntax Advanced data sharing –long transactions; optimistic concurrency; multiple versions of data; private data check-out Client-server architecture

21 Advanced Databases – Lecture # 11 Object-Oriented Databases OODB Evolution Persistent Programming Languages e.g. Napier88, PJama Extended Relational Systems e.g. UniSQL, Oracle, Illustra OOPL add db facilities e.g. C++, Smalltalk -> ObjectStore, Gemstone,POET Semantic Data Models e.g. ER, UML, FDM -> OpenODB, ODBII OODB Programming LanguagesDatabases RDBMS Model based systems add language facilities to a new data model. e.g O2, ODMG

22 Advanced Databases – Lecture # 11 Object-Oriented Databases Strategies for building OODBMS Extend OO programming languages to be persistent –popular approach –programming viewpoint rather than a database one –no standard model; one programming language; –ObjectStore, POET, Gemstone Use an object-oriented data model for the DBMS –database management viewpoint –need language bindings –query languages, transaction management etc –O2, lambda-DB Standardization of model and services –ODMG 3 Standard; OMG (CORBA)

23 Advanced Databases – Lecture # 11 Object-Oriented Databases Summary Introduction to OO Concepts Motivation of why OODBs are inevitable An Example of OO Schema Comparison with RDBs and ORDBs Advantages and Disadvantages of OODBs Evolution of OODBs Strategies of building an OODBMS