Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object relational database managmement systems (ORDBMS) Adapted by Edel Sherratt from originals by Nigel Hardy.

Similar presentations


Presentation on theme: "Object relational database managmement systems (ORDBMS) Adapted by Edel Sherratt from originals by Nigel Hardy."— Presentation transcript:

1 Object relational database managmement systems (ORDBMS) Adapted by Edel Sherratt from originals by Nigel Hardy

2 ORDBMS Like a relational database management system But with classes and inheritance

3 Basic Idea Extend the relational model – do not throw away that strength – recognise that OO has additional strengths – add OO features to existing systems

4 Some examples Postgres – Illustra, acquired by Informix, in turn acquired by IBM – PostgreSQL Omniscience, Omniscience corporation, acquired by Oracle, became Oracle Lite DB2, Oracle database, Microsoft SQL Server

5 The Important extensions 1.structured types for attributes 2.references to tuples 3.methods 4.IDs for tuples but relations (and queries on them) remain central

6 Structured types for attributes As well as atomic types: int, float, char, boolean... Also allow structs, sets, bags, lists, arrays. And more complex arrangements: bags of structs i.e. relations

7 User defined types (UDTs) as attribute types CREATE TYPE addrType AS (street CHAR(50),city CHAR(20) ); CREATE TYPE student AS (name CHAR (30),sid char(9), address addrType ); CREATE TABLE company (name CHAR(20) PRIMARY KEY,address addrType ); keys are declared as part of tables - not UDTs

8 UDTs as table types CREATE TABLE students OF student; where student has three attributes 1.name 2.student_id 3.address and where address is a struct of – street – city

9 What about methods? include declaration in the type declare code separately CREATE TYPE student AS (... METHOD avgMark() RETURNS DECIMAL(5,2) ); CREATE METHOD avgMark() RETURNS DECIMAL(5,2) FOR student BEGIN... END;

10 What about Identity Often hidden from user But can be made visible can be SYSTEM GENERATED – like an OID can be DERIVED from the declared table key

11 And what about data manipulation? Essentially SQL, with programming language extensions Some extras – for example to enable access to object identifiers

12 Inheritance UDTs can “extend” UDTs – all the attributes and methods of the parent – plus any that are added tables can “extend” tables – all the attributes, keys and constraints of the parent – plus any that are added Keywords vary

13 Querying inheritance structures by default, querying a parent searches all subtypes the ONLY keyword limits it to the given table assume Staff is UNDER Person SELECT p.name FROM Person p; SELECT p.name FROM ONLY(Person) p; SELECT s.name FROM Staff s;

14 BLOBs and CLOBs Large OBjects Binary and Character stored and retrieved cannot take part in standard search comparisons – though CLOB can be searched for substrings CLOBs for texts, code BLOBs for images, sounds, video

15 ORDBMS - conclusion here and growing builds on RDBMS expertise using other widely available expertise introduces complexity and cost it does let us handle some of the difficult applications much more easily – but how common are they – must the “traditional” applications pay the cost?


Download ppt "Object relational database managmement systems (ORDBMS) Adapted by Edel Sherratt from originals by Nigel Hardy."

Similar presentations


Ads by Google