Object-Oriented Database Systems (part 1) CS263 Lecture 17.

Slides:



Advertisements
Similar presentations
Limitations of the relational model 1. 2 Overview application areas for which the relational model is inadequate - reasons drawbacks of relational DBMSs.
Advertisements

Chapter 10: Designing Databases
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.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
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.
Database Management System (DBMS)
File Systems and Databases
Ch1: File Systems and Databases Hachim Haddouti
Object-Oriented Databases
File Systems and Databases Hachim Haddouti
Object (and Object-Relational) Database Systems (part two)
Introduction to Object DBMSs Transparencies © Pearson Education Limited 1995, 2005.
Lecture 13: Object- Oriented Concepts Anita S. Malik Adapted from Schach (2004) Chapter 7.
Object Oriented Databases - Overview
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
Chapter 24 Introduction to Object DBMSs Prepared by Kai Huang CS157B Prof Sin-Min Lee.
Introduction to the Other Databases
Chapter 4 The Relational Model.
Part 3: Introduction to Object DBMSs
Temple University – CIS Dept. CIS616– Principles of Database Systems V. Megalooikonomou Introduction (based on notes by Silberchatz,Korth, and Sudarshan)
ADVANCED DATABASES WITH ORACLE 11g FOR ADDB7311 LEARNING UNIT 1 of 7.
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.
Database Management System Lecture 3 Models of Database Management Systems.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
OBJECT DATABASE SYSTEMS PART ONE  Advanced database application areas  Problems associated with RDBMSs  Third Generation DBMSs  What is Object Orientation?
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.
Object-Oriented Database Management Systems (ODBMS)
OBJECT-ORIENTED APPROACH TO GIS DATA MANAGEMENT Tomáš Richta, Jiří Žára Computer Graphics Group Department of Computer Science and Engineering Czech Technical.
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.
Chapter 1 Object-oriented DBMSs Chapters in Textbook.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Chapter 11 Object-Oriented DBMSs Chapter 27, 28 & Appendix K in Textbook.
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.
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Object Oriented Database By Ashish Kaul References from Professor Lee’s presentations and the Web.
AND OBJECT-ORIENTED DATABASES OBJECT-RELATIONAL DATABASES.
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,
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
ASET 1 Amity School of Engineering & Technology B. Tech. (CSE/IT), III Semester Database Management Systems Jitendra Rajpurohit.
CS3431: C-Term CS3431 – Database Systems I Introduction Instructor: Mohamed Eltabakh
Lecture on Database Management System
Database System Concepts Introduction Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Transaction.
Databases Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
Data Models. 2 The Importance of Data Models Data models –Relatively simple representations, usually graphical, of complex real-world data structures.
©Silberschatz, Korth and Sudarshan 1.1 Database System Concepts قواعد البيانات Data Base قواعد البيانات CCS 402 Mr. Nedal hayajneh E- mail
CHAPTER 1: INTRODUCTION Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Storage Management Database.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 1: Introduction.
CS 325 Spring ‘09 Chapter 1 Goals:
The Object-Oriented Database System Manifesto
Object-Oriented Database Management System (ODBMS)
Chapter 1: Introduction
Lec 3: Object-Oriented Data Modeling
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Presentation transcript:

Object-Oriented Database Systems (part 1) CS263 Lecture 17

LECTURE PLAN OBJECT DATABASE SYSTEMS PART ONE  Advanced database application areas  Problems associated with RDBMSs  Third Generation DBMSs  What is Object Orientation?  What is an OODBMS?

ADVANCED APPLICATION AREAS DATABASES  Computer-Aided Design (CAD).  Computer-Aided Manufacturing (CAM).  Computer-Aided Software Engineering (CASE).  Office Information Systems (OIS).  Multimedia Systems.  Digital Publishing.  Geographic Information Systems (GIS).  Scientific and Medical Systems.

RELATIONAL DBMSs  Poor representation of ‘real world’ entities.  Semantic overloading.  Poor support for integrity and business constraints.  Homogeneous data structure.  Limited operations.  Difficulty handling recursive queries.  Impedance mismatch.  Difficulty with ‘Long Transactions’. PROBLEMS

RELATIONAL DBMSs  Poor representation of ‘real world’ entities.  Semantic overloading.  Poor support for integrity and business constraints.  Homogeneous data structure.  Limited operations.  Difficulty handling recursive queries.  Impedance mismatch.  Difficulty with ‘Long Transactions’. PROBLEMS

RELATIONAL DBMSs PROBLEMS - REAL-WORLD OBJECTS CAR C# WHEEL W# SEAT S# TRIM T# C# W# C# Has Part of Has Part of Has ER Diagram - Car

RELATIONAL DBMSs PROBLEMS - REAL-WORLD OBJECTS Select * From Car, Wheel, Trim, Seat Where Car.C# = Wheel.C# And Car.C# = Seat.C# And Wheel.W# = Trim.W#; To find out all details about a Car we would have to carry out a large number of (expensive) JOIN operations. Car {C#, Chassis#, NoWheels, NoSeats, etc…} Wheel {W#, C#, Size, Pressure, etc…} Trim {T#, W#, Material, Cost, etc…} Seat {S#, C#, Material, Size, Cost,, etc…} NORMALISATION

RELATIONAL DBMSs  Poor representation of ‘real world’ entities.  Semantic overloading.  Poor support for integrity and business constraints.  Homogeneous data structure.  Limited operations.  Difficulty handling recursive queries.  Impedance mismatch.  Difficulty with ‘Long Transactions’. PROBLEMS

RELATIONAL DBMSs PROBLEMS - SEMANTIC OVERLOADING ER Diagram Doctor {D#, Name, Surgery, etc…} Patient {P#, D#, Name, Address, DOB, etc…} DOCTOR D# PATIENT P# D# Oversees Overseen by DOCTOR D# PATIENT P# D# Kills Killed by We do not record the nature of the relationship between doctor and patient!

RELATIONAL DBMSs  Poor representation of ‘real world’ entities.  Semantic overloading.  Poor support for integrity and business constraints.  Homogeneous data structure.  Limited operations.  Difficulty handling recursive queries.  Impedance mismatch.  Difficulty with ‘Long Transactions’. PROBLEMS

RELATIONAL DBMSs  Poor representation of ‘real world’ entities.  Semantic overloading.  Poor support for integrity and business constraints.  Homogeneous data structure.  Limited operations.  Difficulty handling recursive queries.  Impedance mismatch.  Difficulty with ‘Long Transactions’. PROBLEMS

RELATIONAL DBMSs PROBLEMS - HOMOGENEOUS DATA STRUCTURE STRATFORDKHAN BARKINGONO BARKINGGREEN STRATFORDSMITH BARKINGGRAY STRATFORDJONES200 BALANCE BRANCHCUSTOMERACCOUNT ACCOUNT TABLE ALL ROWS HAVE THE SAME NUMBER OF ATTRIBUTES ALL VALUES IN A COLUMN ARE OF THE SAME TYPE ALL ATTRIBUTE VALUES ARE ATOMIC

RELATIONAL DBMSs  Poor representation of ‘real world’ entities.  Semantic overloading.  Poor support for integrity and business constraints.  Homogeneous data structure.  Limited operations.  Difficulty handling recursive queries.  Impedance mismatch.  Difficulty with ‘Long Transactions’. PROBLEMS

RELATIONAL DBMSs  Poor representation of ‘real world’ entities.  Semantic overloading.  Poor support for integrity and business constraints.  Homogeneous data structure.  Limited operations.  Difficulty handling recursive queries.  Impedance mismatch.  Difficulty with ‘Long Transactions’. PROBLEMS

RELATIONAL DBMSs PROBLEMS - RECURSIVE QUERIES Question - Who does SMITH work for? SMITH Select E2.ENAME From EMP E1, EMP E2 Where E1.MGR = E2.EMPNO And E1.ENAME = “SMITH”; First Level Answer – SMITH works for FORD FORD JONES Select E3.ENAME From EMP E1, EMP E2, EMP E3 Where E1.MGR = E2.EMPNO And E2.MGR = E3.EMPNO And E1.ENAME = “SMITH”; Second Level Answer - SMITH works for JONES KING Select E4.ENAME From EMP E1, EMP E2, EMP E3, EMP E4 Where E1.MGR = E2.EMP And E2.MGR = E3.EMPNO And E3.MGR = E4.EMPNO And E1.ENAME = “SMITH”; Third Level Answer – SMITH works for KING ?

RELATIONAL DBMSs  Poor representation of ‘real world’ entities.  Semantic overloading.  Poor support for integrity and business constraints.  Homogeneous data structure.  Limited operations.  Difficulty handling recursive queries.  Impedance mismatch.  Difficulty with ‘Long Transactions’. PROBLEMS

RELATIONAL DBMSs PROBLEMS - IMPEDANCE MISMATCH SQL is a declarative, set-based language that is not computationally complete! This is expensive in terms of application processing time and programming effort, accounting for around 30% of some projects! We therefore have to map sets of data into records using memory structures such as cursors. Database applications require the use of a computationally complete, record-based, procedural language such as C, C++, Java, and PL/SQL.

RELATIONAL DBMSs  Poor representation of ‘real world’ entities.  Semantic overloading.  Poor support for integrity and business constraints.  Homogeneous data structure.  Limited operations.  Difficulty handling recursive queries.  Impedance mismatch.  Difficulty with ‘Long Transactions’. PROBLEMS

THIRD GENERATION DBMSs

Support Complex Active Objects Allow both data and its associated behaviour to be modelled to any level of complexity. Improve Extensibility Allow for the dynamic extension of both allowable data types and the behaviour associated with these types. Reduce the Impedance Mismatch Ensure that there is a seamless integration between the DBMS data model and that of the programming language accessing the data. THIRD GENERATION DBMSs MAIN AIMS

OBJECT ORIENTATION

Object Model WHAT IS AN ATOMIC (LITERAL) OBJECT? An atomic object is a container for a fixed value and serves the same purpose as a constant in a programming language. An atomic object cannot change its own state. Examples of atomic types and atomic objects Integer - e.g. 1, 2, 3, -5, -45, etc..... Float - e.g. 1.52, , 2.000, etc... Boolean - i.e. True or False Char - e.g. a, b, #, !, etc... String - e.g. “Mark”, “Database Systems”

Object Model WHAT IS A (MUTABLE) OBJECT? I am an object! UNIQUE OBJECT IDENTIFIER (OID) NAMEMARK DOB14/02/1964 JOBLECTURER ATTRIBUTES State RELATIONSHIPS CHANGE JOB GET AGE BEHAVIOUR Methods

Object Model WHAT IS A CLASS? I am an object! MARK I am also an object! IAN

Object Model WHAT IS A CLASS? MARK I am a Person! So am I! IAN PERSON CLASS PERSON NAME DOB JOB CHANGE JOB GET AGE

Object Model WHAT IS AN OBJECT IDENTIFIER (OID)? Each object is uniquely identifiable from all other objects. When an object is first created it is assigned a value to identify it. This value is called its Object Identifier.  System generated.  Unique to that object.  Invariant in that it cannot be altered.  Independent of its attribute values.  Invisible to the user.

Object Model WHAT IS ENCAPSULATION? GET AGE METHOD CHANGE JOB METHOD NAME:MARK DOB:14/02/64 JOB:LECTURER GET AGE CHANGE JOB OBJECT

Object Model WHAT IS A COMPLEX OBJECT? Yes, it’s an object that is made up of other objects! Wheels, Seats, Chassis, Exhaust, Steering Wheel, etc, etc... Is a Car a Complex Object? And… a wheel itself is also a complex object! Tire, Trim, Hub Cap, etc, etc...

Object Model WHAT IS A COMPLEX OBJECT? CAR TIRE HUB CAP TRIM TIRE HUB CAP TRIM TIRE HUB CAP TRIM TIRE HUB CAP TRIM CHASSIS WHEEL SEAT REGISTRATION NUMBER

Object Model WHAT IS A COMPLEX OBJECT? CAR TIRE HUB CAP TRIM TIRE HUB CAP TRIM TIRE HUB CAP TRIM TIRE HUB CAP TRIM CHASSIS WHEEL REGISTRATION NUMBER SEAT A Wheel IS-PART-OF a Car A Car has a COLLECTION of Wheels

Object Model CAR REG-NUMBER:STRING CHASSIS:STRING WHEELS:SET SEATS:SET WHEEL TIRE: STRING HUB CAP: STRING TRIM: STRING WHEEL TIRE: STRING HUB CAP: STRING TRIM: STRING WHEEL TIRE: STRING HUB CAP: STRING TRIM: STRING WHEEL TIRE: STRING HUB CAP: STRING TRIM: STRING SEAT TIRE: STRING HUB CAP: STRING TRIM: STRING SEAT TIRE: STRING HUB CAP: STRING TRIM: STRING SEAT TIRE: STRING HUB CAP: STRING TRIM: STRING SEAT TYPE: STRING COLOUR: STRING POSITION: STRING WHAT IS A COMPLEX OBJECT?

Object Model WHAT IS A COLLECTION - SET? SET - An unordered collection of distinct objects of the same type e.g, Customers : SET ; BILL MARK HILDA MARIE CAROLINE An instance of CUSTOMERS

Object Model WHAT IS A COLLECTION - BAG? An instance of PHONE_CALLS BAG - An unordered collection of objects of the same type e.g, Phone_calls : BAG ;

Object Model WHAT IS A COLLECTION - LIST? LIST - An ordered collection of objects of the same type e.g, MachineFaults : LIST ; An instance of MachineFaults Fault at 11:00:01 Fault at 11:00:20 Fault at 11:31:00 Fault at 11:44:33 Fault at 12:00:00

Object Model WHAT IS A COLLECTION - ARRAY? ARRAY – Each object is stored at a particular position e.g, StudySchedule : ARRAY ; TASK #1 TASK #2 TASK #4 TASK #1 TASK #3 TASK #1 An instance of StudySchedule

Object Model WHAT IS A STRUCTURE? A fixed number of named slots, each of which can contain an object of a particular type. e.g, CustomersDetails : STRUCTURE < forenames : List, family_name : String, customer_no : Integer > Marie Rebecca Caroline Campbell forenames family_name customer_no An instance of CustomerDetails

Object Model WHAT IS INHERITANCE? Person name address telephone_no change_name (...) change_address (...) Employee employee_no promote(...) pay_employee (...) Customer customer_no place_order(...) make_payment(...) TradeCustomer trade_discount% place_order(...) make_payment(...) IS-A

Object Model WHAT IS MULTIPLE INHERITANCE? Person name address telephone_no change_name (...) change_address (...) Employee employee_no promote(...) pay_employee (...) Customer customer_no place_order(...) make_payment(...) Employee_Customer staff_discount_card place_order(...) make_payment(...) TradeCustomer trade_discount% place_order(...) make_payment(...) IS-A

Object Model WHAT ARE OBJECT RELATIONSHIPS? Child.... Mother.... * child_of 1 mother_of one-to-many Husband.... Wife husband_of 1 wife_of one-to-one Child.... Parent.... * child_of * parent_of many-to-many

Object Model WHAT ARE METHODS AND MESSAGES? GET AGE METHOD BODY CHANGE JOB METHOD BODY NAME:MARK DOB:14/02/64 JOB:LECTURER GET AGE MESSAGE CHANGE JOB MESSAGE USER PROGRAM OBJECT DISK

Object Model WHAT IS POLYMORPHISM? CLOCK... SetTime () SetAlarm () ShowTime () ANALOGUE CLOCK... SetTime () SetAlarm () ShowTime () DIGITAL CLOCK... SetTime () SetAlarm () ShowTime () 11:00 PM DIFFERENT TYPES OF OBJECT RESPOND DIFFERENTLY TO THE SAME MESSAGE

Object Model WHAT IS OVERIDING? When a sub-class’s method body is used rather than the body of the super-class’s method it is known as overriding. CUSTOMER Customer No. PlaceOrder() MakePayment() TRADE CUSTOMER TradeDiscount% PlaceOrder() METHOD BODY 1. Create order details 2. Calculate total cost METHOD BODY 1. Create order details 2. Calculate total cost 3. Apply Trade Discount SUPER-CLASS SUB-CLASS IS-A

Object Model WHAT IS LATE BINDING? Late or dynamic binding is the ability of the runtime system to determine which method body to execute depending on the type of an object. CUSTOMER TIRE: STRING HUB CAP: STRING TRIM: STRING Trade Customer TIRE: STRING HUB CAP: STRING TRIM: STRING CUSTOMER TIRE: HUB CAP: TRIM: STRIN Trade Customer CUSTOMER NO PLACE_ORDER MAKE_PAYMENT Customers := SET FOR x IN Customers DO x.PLACE_ORDER END Where x := an individual Customer Object! It doesn’t matter if a customer is a trade customer, late binding ensures the appropriate PLACE_ORDER method body is called!

OODBMS

WHAT IS AN OODBMS? Object Oriented Database Management Systems (OODBMSs) are an attempt at marrying the power of Object Oriented Programming Languages with the persistence and associated technologies of a DBMS. OOPLsDBMSs Complex ObjectsPersistence Object IdentityDisc Management Methods & MessagesData Sharing InheritanceReliability PolymorphismSecurity ExtensibilityAd Hoc Querying Computational Completeness OBJECT ORIENTED DATABASE MANAGEMENT SYSTEM

OODBMS WHAT AN OODBMS SHOULD SUPPORT?  Atomic and complex objects  Methods and messages  Object Identity  Single inheritance  Polymorphism - overloading and late-binding  Persistence  Shared Objects In addition an OODBMS can optionally support  Multiple inheritance  Exception messages  Distribution  Long Transactions  Versions