Chapter 11 Object-Oriented DBMSs Chapter 27, 28 & Appendix K in Textbook.

Slides:



Advertisements
Similar presentations
1 Chapter 25 Introduction to Object DBMSs Transparencies © Pearson Education Limited 1995, 2005.
Advertisements

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.
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.
Object-Oriented Standards OMG OMDG. Overview Object Management Group (OMG) International non profit-making consortium founded in 1989 to address object.
Object-Oriented Databases
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
1 9 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 9 Database Management Approaches.
Introduction to Object DBMSs Transparencies © Pearson Education Limited 1995, 2005.
Oracle Database Administration
Object-oriented DBMSs
Lecture 13: Object- Oriented Concepts Anita S. Malik Adapted from Schach (2004) Chapter 7.
The University of Akron Dept of Business Technology Computer Information Systems Database Management Approaches 2440: 180 Database Concepts Instructor:
Object Oriented Databases - Overview
July 13, 2015ADBS: OODB1 Concepts for Object-Oriented Databases Chapter 20.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
Dr. Kalpakis CMSC 461, Database Management Systems Introduction.
Databases Illuminated Chapter 7 The Object-Oriented Model.
Relational Database Management System A type of database in which records are stored in relational form is called relational database management system.
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
Chapter 4 Object and Object-Relational Databases (Part ½: Object-Oriented Concepts) Lecturer: H.Ben Othmen Department of Computer Science, Umm Al-Qura.
EER vs. UML Terminology EER Diagram Entity Type Entity Attribute
Object and object-relational databases 1. Object databases vs. Object-relational databases Object databases Stores complex objects – Data + functions.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
Chapter 24 Introduction to Object DBMSs Prepared by Kai Huang CS157B Prof Sin-Min Lee.
Introduction to the Other Databases
Part 3: Introduction to Object DBMSs
Agenda  TMA03  M877 Block 3 Databases with Objects.
Introduction to Databases
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.
Object-Oriented Database Management Systems (ODBMS)
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
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.
Unified Modeling Language, Version 2.0
Object_Oriented Databases, by Dr. Khalil 1 Object-Oriented DBMSs Dr. Awad Khalil Computer Science Department AUC.
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.
Chapter 1 Object-oriented DBMSs Chapters in Textbook.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
Object_Oriented Databases, by Dr. Khalil 1 Object-Oriented Databases Dr. Awad Khalil Computer Science Department AUC.
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.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
OODBMS: Introduction and Logical Database Design
Chapter 2 Object-Relational DBMSs Chapter 28 in Textbook.
Onject-oriented Database Prof. Sin-Min Lee Department of Computer Science.
1 Unified Modeling Language, Version 2.0 Chapter 2.
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.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database.
OODBMS and ORDBMS. Background Object-oriented software, based on the principles of user-defined datatypes, along with inheritance and polymorphism, is.
©Silberschatz, Korth and Sudarshan 1.1 Database System Concepts قواعد البيانات Data Base قواعد البيانات CCS 402 Mr. Nedal hayajneh E- mail
Introduction to DBMS Purpose of Database Systems View of Data
OBJECTS & DATABASES Arnaud Sahuguet – CIS-550.
Object-Oriented Database Management System (ODBMS)
Chapter 1: Introduction
Object-Relational DBMSs
Chapter 12 Outline Overview of Object Database Concepts
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Compiled from Connelly et al. DBMS Text
Chapter 20 Object-Oriented Analysis and Design
Introduction to DBMS Purpose of Database Systems View of Data
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 15: Object-Oriented Database Development
Chapter 1: Introduction
Chapter 1: Introduction
Presentation transcript:

Chapter 11 Object-Oriented DBMSs Chapter 27, 28 & Appendix K in Textbook

2 Advanced Database Applications Computer-Aided Design (CAD). Computer-Aided Manufacturing (CAM). Computer-Aided Software Engineering (CASE). Network Management Systems. Office Information Systems (OIS) and Multimedia Systems. Digital Publishing. Geographic Information Systems (GIS). Interactive and Dynamic Web sites. Other applications with complex and interrelated objects and procedural data. OODBMS

3 Weaknesses of RDBMSs Poor Representation of “Real World” Entities. Semantic Overloading. Poor Support for Integrity and Enterprise Constraints. Homogeneous Data Structure. Limited Operations. Difficulty Handling Recursive Queries. Impedance Mismatch. Other Problems with RDBMSs: o Transactions are generally short-lived and concurrency control protocols not suited for long-lived transactions. o Schema changes are difficult. o RDBMSs are poor at navigational access. OODBMS

4 Example - Recursive Query S005 S004 S003 S002 S001 S005 S004 S003 S004 S003 S002 S001 NULL S003 S002 S001 S002 S001 StaffNo S005 S004 S003 S002 S001 S004 S003 S002 S001 NULL MangrsSNo MangrSNoStaffNo OODBMS

5 What is an OODBMS ? OODBMS OODBMS (Object-oriented Database Management System): is a database with data stored in objects and collections NOT rows and tables. Object Oriented Concepts:  Abstraction, encapsulation, and information hiding.  Objects and attributes.  Object identity.  Methods and messages.  Classes, subclasses, superclasses, and inheritance.  Overriding, Overloading, Polymorphism and Dynamic Binding.

OODBMS6 Traditional DBS Persistence Sharing Transactions Concurrency Control Recovery Control Security Integrity Querying Semantic Data Model Generalization Aggregation OO Programming OID Encapsulation Inheritance Types & Classes Methods Complex objects Polymorphism Extensibility Special Requirements Versioning Schema Evolution OODBMSOODBMS

7Abstraction Abstraction is the process of identifying essential aspects of an entity and ignoring unimportant properties. Concentrate on what an object is and what it does, before deciding how to implement it. OODBMS

8 Encapsulation & Information Hiding Encapsulation: means that an object contains both data structure and set of operations used to manipulate it. Information Hiding: means separating external aspects of an object from its internal details, which are hidden from outside. Allows internal details of an object to be changed without affecting applications that use it, provided external details remain same. Provides data independence. OODBMS

9Objects Object is a uniquely identifiable entity that contains both: the attributes that describe the state of a real-world object, and the actions associated with it. Definition very similar to that of an entity, however, Object encapsulates both state and behavior; an entity only models state. Persistent Objects vs. Transient Objects: Transient: object’s memory allocated and deallocated by programming language’s runtime system. Persistent: object’s storage managed by OODBMS. OODBMS

10Attributes Attributes contain current state of an object: Attributes can be classified as simple or complex. Simple attribute can be a primitive type such as integer, string, etc., which takes on literal values. Complex attribute can contain collections and/or references. Reference attribute represents relationship. An object that contains one or more complex attributes is called a complex object. OODBMS

11 Object Identity (OID) Object identifier (OID) assigned to object when it is created that is: System-generated. Unique to that object. Invariant. Independent of the values of its attributes (that is, its state). Invisible to the user (ideally). OODBMS

12 Object Identity (OID) In RDBMS, entity identity is value-based: primary key is used to provide uniqueness. Primary keys do not provide type of object identity required in OO systems: key only unique within a relation, not across entire system; key generally chosen from attributes of relation, making it dependent on entity state. OODBMS

13 Methods & Messages Method: Defines behavior of an object, as a set of encapsulated functions. Message: Request from one object to another asking second object to execute one of its methods. OODBMS

14 Object Showing Attributes & Methods Attributes Method 4 Method 3 Method 2Method 1 OODBMS

15Classes Classes are blueprints for defining a set of similar objects. Objects in a class are called instances. Class is also an object with own class attributes and class methods. Object created from the same class share the same class attributes and methods. OODBMS

16 Class Instance Share Attributes & Methods BRANCH BranchNo = B005 Street = 22 Deer Rd City = London Postcode = SW1 4EH BranchNo = B007 Street = 16 Argyll St City = Aberdeen Postcode = AB2 3SU BranchNo = B003 Street = 163 Main St City = Glasgow Postcode = G11 9QX Attributes branchNo street city postcode Methods print() getPostCode() numberOfStaff() OODBMS

17 Subclasses, Superclasses, & Inheritance Inheritance allows one class of objects to be defined as a special case of a more general class. Special cases are subclasses and more general cases are superclasses. Process of forming a superclass is generalization; forming a subclass is specialization. Subclass inherits all properties of its superclass and can define its own unique properties. Subclass can redefine inherited methods (overriding). Relationship between subclass and superclass known as A KIND OF (AKO) relationship. OODBMS

18 Subclasses, Superclasses, & Inheritance Types of inheritance: single, multiple, and repeated. OODBMS Single InheritanceMultiple InheritanceRepeated Inheritance

19 Overriding, Overloading & Polymorphism Overriding is the process of redefining a property within a subclass. Overloading allows name of a method to be reused with a class or across classes. Polymorphism means ‘many forms’. Three types: operation, inclusion, and parametric. The process of selecting the appropriate method based on an object’s type is called binding. If the determination of an object’s type can be deferred until runtime (rather than compile time), the selection is called dynamic binding. OODBMS

20 Complex Objects A Complex object is something that can be viewed as a single object in the real world but it actually consists of many sub-objects. Two types of complex objects: Unstructured complex objects: Their structure hard to determine. Requires a large amount of storage. BLOB (Binary Large Objects): images & long test strings. Structured complex objects: Clear structure. Sub-objects in A PART-OF (APO) relationship. OODBMS

21 Structured Complex Objects The contained object can be handled in one of two ways: Contained object can be encapsulated within complex object, accessed by complex object’s methods. Or have its own independent existence, and only an OID is stored in complex object. OODBMS M1 M3 M2 M4 Obj 2 Obj 1 Obj 2 M1 M3 M2 M4 Obj 1 OID 2 M1 M3 M2 M4 Obj 3 OID 2

Contains a number of unnamed, homogeneous elements; each can be instance of atomic type, another collection, or a literal type. Types of Constructors: Set: unordered collection of objects without duplicates. Bag: unordered collection of objects that allows duplicates. List: ordered collection of objects that allows duplicates. Array: ordered collection of objects without duplicates. Dictionary: unordered sequence of key-value pairs without duplicate keys. 22Collections OODBMS

23 Commercial OODBMSs GemStone from Gemstone Systems Inc., Itasca from Ibex Knowledge Systems SA, Objectivity/DB from Objectivity Inc., ObjectStore from eXcelon Corp., Ontos from Ontos Inc., Poet from Poet Software Corp., Jasmine from Computer Associates/Fujitsu, Versant from Versant Object Technology. OODBMS

24 Object Data Management Group (ODMG) ODMG is an international consortium founded to address object standards. Major components of ODMG architecture for an OODBMS are: Unified Modeling Language (UML). Object Model (OM). Object Definition Language (ODL). Object Query Language (OQL). C++, Smalltalk, and Java Language Binding. OODBMS

25 Unified Modeling Language (UML) UML is a standard language for specifying, constructing, visualizing, and documenting the artifacts of a software system. Include many structural diagrams (Class, Object diagrams…) and behavioral diagrams (UseCase, Sequence diagrams…). Used to model objects and object relationships. OODBMS Class Name Attribute Method BRANCH branchNo street city postcode print() getPostCode() numberOfStaff() MANAGER StaffNo sex DOB salary increasesalary() PROPERTY PropertyNo street city postcode rooms type 1..1 manage offer 1.* offered-by Association

26 Unified Modeling Language (UML) OODBMS PERSON Name FName LName STAFF StaffNo position DOB salary POWNER OwnerNo address CLIENT ClientNo telNO prefType MaxRent MANAGERSALESTAFF BRANCH PROPERTY PropertyNo rooms rent BranchNo address Manages WorksAt Offers Views Owns M 1 M 1 MM N ManagedBy Has OwnedBy IsOfferedBy ViewedBy

27 Object Model (OM) Object Model (OM) provides the data type, type constructors & other concepts utilized in the ODL to specify the object schema. Basic building blocks are object and literal. Only an object has a unique identifier and state (current value). Literal is a constant values. e.g. “Ahmed”, “123 Main St, London”. Behavior defined by set of operations that can be performed on or by object. State defined by values objects carry for a set of attributes of object or relationships between object and one or more other objects. OODBMS

28 Object Definition Language (ODL) Object Definition Language (ODL) is a language for defining the specification of object types for OODBMS. e.g. of ODL definition for DreamHome: OODBMS module DreamHome { Class Branch (extent branchOffices key branchNo) { attribute string branchNo; attribute struct BranchAddress {string street, string city, string postcode} address; relationship Manager ManagedBy inverse Manager::Manages; relationship set Has inverse SalesStaff::WorksAt; relationship set Offers inverse PropertyForRent::IsOfferedBy; void takeOnPropertyForRent(in string propertyNo) raises(propertyAlreadyForRent); };

29 Object Query Language (OQL) Object Query Language OQL is a query language for OODBMS. Does not provide explicit update operators - leaves this to operations defined on object types. OQL can be used for both associative and navigational access: Associative query returns collection of objects (like SQL). Navigational query accesses individual objects and object relationships used to navigate from one object to another. OODBMS

30 Object Query Language (OQL) OQL vs. SQL A Simple Example: List the names of the children of employees working in the sales department. OODBMS select c.fname, c.lname from Department d, d.Employee e, e.Children c where d.name = “Sales”; select c.fname, c.lname from Department d, Employee e, Children c where d.name = “Sales” and d.deptID = e.deptID and c.parentID = e.empID; OQLSQL