Docsity

Object Relational Database Management: Models and Systems | CS 4440, Papers of Computer Science

Toggle sidebar
bg1
1
Object Relational Database
Object Relational Database
Management: Models and
Management: Models and
Systems
Systems
ACKNOWLEDGEMENT: Andrew ACKNOWLEDGEMENT: Andrew LiashenkoLiashenko , Maxim , Maxim KoutsakKoutsak, , Yifan Yifan Shi, Shi, Ning Ning Tan (CS 6411)Tan (CS 6411)
©Shamkant B. Navathe 8 -2
A Matrix for Classifying DBMS Evolution*
RELATIONAL
DBMS OBJECT-
RELATIONAL DBMS
TOOLS AND SYSTEMS
TO MANAGE DATA (E.G.,
EXCEL, WORD, ......)
OBJECT-ORIENTED
DBMS
Simple Data Complex Data
Simple Q Comp. Q
* Based on the book Object Relational DBMSby Stonebraker and Moore, Morgan
Kaufmann, 1996
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download Object Relational Database Management: Models and Systems | CS 4440 and more Papers Computer Science in PDF only on Docsity!

Object Relational Database Object Relational Database

Management: Models andManagement: Models and

SystemsSystems

ACKNOWLEDGEMENT:ACKNOWLEDGEMENT: AndrewAndrew LiashenkoLiashenko , Maxim, Maxim KoutsakKoutsak,, YifanYifan Shi,Shi, NingNing Tan (CS 6411)Tan (CS 6411)

©Shamkant B. Navathe 8 - 2

A Matrix for Classifying DBMS Evolution*

RELATIONAL

DBMS

OBJECT-

RELATIONAL DBMS

TOOLS AND SYSTEMS TO MANAGE DATA (E.G., EXCEL, WORD, ......)

OBJECT-ORIENTED

DBMS

Simple Data Complex Data

Simple Q

Comp. Q

  • Based on the book Object Relational DBMSby Stonebraker and Moore, Morgan Kaufmann, 1996

©Shamkant B. Navathe 8 - 3

OBJECT-RELATIONAL

EVOLUTION

  • Note: INFORMIX was the first to define the

“Object-relational” market with the acqusition of ILLUSTRA Object-based DBMS: Informix Universal Server

  • ORACLE followed with its own universal

server

  • IBM followed with UDB: Universal

Database

©Shamkant B. Navathe 8 - 4

ODMG Model: Towards the New OODBMS

and ORDMBS Standards

(Based on “Fundamentals of Database Systems”, Ch. 12 and 13 by Elmasri and Navathe)

©Shamkant B. Navathe 8 - 7

ODMG 2.0: Object Model (Cont.)

  • Object structure
    • atomic objects: everything which is not a

collection (structured objects, etc.)

  • collection objects
  • Concept of a Literal: doesn’t have an object

identifier

  • atomic
  • collection
  • structured

©Shamkant B. Navathe 8 - 8

ODMG 2.0: Object Model (Cont.)

  • Interfaces
    • behavior (operations)
    • state (attributes and relationships)
    • abstract behavior (operation signatures)
    • noninstantiable
  • Classes
    • specification of both abstract behavior and state
    • inheritance via “:” and EXTENDS keyword
    • instantiable

©Shamkant B. Navathe 8 - 9

ODMG 2.0: Object Model (Class

Example)

class Employee ( extent allEmployees key ssn ) { attribute string name; attribute string ssn; attribute date birthdate; attribute enum Gender{M,F} sex; attribute short age; relationship Department worksFor inverse Department::hasEmps; void reassignEmp ( in string newDname) raises (dnameNotValid); };

©Shamkant B. Navathe 8 - 10

ODMG 2.0: Object Model (Interface

Example)

interface Object{ … boolean sameAs (in Object other_object); Object copy(); void delete(); };

©Shamkant B. Navathe 8 - 13

Oracle 8 Extension to SQL2 Example: Representing Multivalued Attributes Using VARRAY

  • We created the customerType data type as an object with

attributes customerName and phoneNumbers; now the customer table as:

CREATE TABLE customer OF customerType;

  • Now to retrieve a list of all customers and their phone numbers

without any joins:

SELECT customerName, phoneNumbers

FROM customers;

©Shamkant B. Navathe 8 - 14

SQL3 Standard (a.k.a. SQL:1999)

  • Components:
    • SQL/Framework, SQL/Foundation,

SQL/Bindings, SQL/Object

  • Temporal, transaction aspects
  • SQL/CLI (Call Level Interface)
  • SQL/PSM (Persistent Stored Modules)
  • The official website (defunct???):

http://www.sql-99.org

©Shamkant B. Navathe 8 - 15

SQL3 Standard (a.k.a. SQL:1999)

  • New operations and features:
    • SIMILAR (to match character strings)
    • UNKNOWN (extension to Boolean values)
    • Linear recursion (recursive queries)
    • Concept of role and use of triggers (INSERT,

DELETE, and UPDATE)

  • Programming language facilities:
    • SQL routines
    • call/return, begin/end, for/end_for, if/then/else/end_if, case/end_case, loop/end_loop, while/end_while, repeat/until/end_repeat, leave

©Shamkant B. Navathe 8 - 16

SQL3 Standard (a.k.a. SQL:1999)

  • Object-Relational Support
    • New data types (Boolean, character, binary large objects, and large object locators)
  • Objects in SQL3:
    • user defined data types
    • type constructors
    • collection types
    • user-defined functions and procedures
  • Row or tuple types
  • Abstract Data Types (ADTs) with functions
    • Built- in constructors, observers, and mutators
    • Access (public/private/protected)
    • Inheritance and overloading

©Shamkant B. Navathe 8 - 19

Four Main Features of an Object-Relational DBMS*

  • Support for Base Type ExtensionBase Type Extension in an SQL context
  • Support for Complex ObjectsComplex Objects in an SQL context
  • Support for InheritanceInheritance in an SQL context
  • Support for a production Rule SystemRule System
  • Based on the book Object Relational DBMS by Stonebraker and Moore

©Shamkant B. Navathe 8 - 20

Base Type Extension

  • Dynamic Linking of user-defined functions
  • Client or Server Activation of user-defined functions
  • Secure User-Defined Functions
  • • CallbackCallback in user-defined functions
  • Use-Defined Access Methods
  • Arbitrary-length data types

©Shamkant B. Navathe 8 - 21

Complex Objects

  • Type constructors
    • set of
    • record of
    • reference
  • Arbitrary-length complex data types
  • SQL support
    • User-defined functions
      • dynamic linking
      • client or server activation
      • securer user-defined functions
      • callback

©Shamkant B. Navathe 8 - 22

Inheritance

  • Data and function inheritance
  • Overloading
  • Inheritance of types, not tables
  • Multiple inheritance

©Shamkant B. Navathe 8 - 25

The Strategies Available to DBMS

Vendors

  • Partner with an object-relational vendor by combining

an object-relational top half with a relational bottom half

  • Extend an object-oriented DBMS with a top half
  • Partner with an object-relational vendor by using an

object-relational top half with an object-oriented DBMS

Oracle 8: The Object-Relational Evolution

Overview of Oracle

Version :

Oracle7 (1992), Oracle8 (1997), Oracle8i,

Oracle9i (October 2, 2000)

Targeted to occupy the market of online, distributed

and large system.

Claimed as “object-enabled” RDBMS.

©Shamkant B. Navathe 8 - 28

Oracle solution architecture

  • 3-tiers Architecture:

client, application server and database server

©Shamkant B. Navathe 8 - 31

User-Defined Data-type (UDT)

1.Original Oracle data-type

  • Character datatypes : CHAR NCHAR VARCHAR2 and VARCHAR NVARCHAR2 CLOB NCLOB LONG
  • Number datatype, Date datatype,
  • Binary datatype: BLOB BFILE RAW LONG RAW
  • ROWID

2.Object type:

  • column type, table type

3.Special support for OO:

  • Collection type, reference type, Object ID, LOB, Object type translator

©Shamkant B. Navathe 8 - 32

User-Defined function (UDF)

  • Map and order
  • Overload, call external function(CORBA)

©Shamkant B. Navathe 8 - 33

Example of UDT and UDF

CREATE TYPE data_t ( derive NUMBER, MEMBER FUNCTION prod(invent NUMBER, prodcode CHAR) RETURN NUMBER ); CREATE TYPE BODY data_t IS MEMBER FUNCTION prod(invent NUMBER, prodcode CHAR) RETURN NUMBER IS BEGIN RETURN (year + invent); END; END;

©Shamkant B. Navathe 8 - 34

  • Cartridge:

3-part provider enabling.

  • Java Support:

JDBC, J/SQL, Java embedded web server.

  • ©Shamkant B. Navathe 8 -
  • ©Shamkant B. Navathe 8 -

©Shamkant B. Navathe 8 - 39

IBM’s Object-Relational Vision

  • Object-relational extensions
    • UDTs,
    • UDFs,
    • LOB support,
    • triggers,
    • enhanced integrity constraints

©Shamkant B. Navathe 8 - 40