Presentation is loading. Please wait.

Presentation is loading. Please wait.

Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications C. Faloutsos OO and OR DBMSs.

Similar presentations


Presentation on theme: "Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications C. Faloutsos OO and OR DBMSs."— Presentation transcript:

1 Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications C. Faloutsos OO and OR DBMSs

2 Carnegie Mellon 15-415 - C. Faloutsos2 General Overview - rel. model Relational model - SQL Functional Dependencies & Normalization Physical Design; Indexing Query optimization Transaction processing Advanced topics –Distributed Databases –OO- and OR-DBMSs

3 Carnegie Mellon 15-415 - C. Faloutsos3 Detailed outline OO DBMSs OR DBMS –complex data types –inheritance –UDFs ORACLE-specific extensions Conclusions

4 Carnegie Mellon 15-415 - C. Faloutsos4 Why more than RDBMSs? RDBMS: tuples, of numbers + strings What apps need only those?

5 Carnegie Mellon 15-415 - C. Faloutsos5 Why more than RDBMSs? RDBMS: tuples, of numbers + strings What apps need only those? –Banks –Airlines –Retailer stores –... Q: Other apps, with more req’s?

6 Carnegie Mellon 15-415 - C. Faloutsos6 Why more than RDBMS’s Q: Other apps, with more req’s? A: –text –multimedia; financial apps/forecasting –Geographic Inf. Sys. –CAD/CAM –Network management

7 Carnegie Mellon 15-415 - C. Faloutsos7 Their specs? complex objects (sets/vectors) inheritance new data types (image, video,...) and user defined functions (UDFs)

8 Carnegie Mellon 15-415 - C. Faloutsos8 Two solutions: Object Oriented DBMSs Object Relational DBMSs

9 Carnegie Mellon 15-415 - C. Faloutsos9 OO DBMS roughly, ‘C++’ with persistence commercial systems: –O2; ObjectStore; Objectivity ODMG: defined standards BUT: OODBMS have small market share Hence: OR-DBMSs

10 Carnegie Mellon 15-415 - C. Faloutsos10 OR DBMSs traditional DBMS with attempts to provide user defined data types support for large / complex objects inheritance

11 Carnegie Mellon 15-415 - C. Faloutsos11 SQL-3 proposed extensions complex types (sets, lists, multisets) inheritance (IS-A hierarchies) User Defined Functions (UDFs)

12 Carnegie Mellon 15-415 - C. Faloutsos12 Complex types eg, create type MyDate ( day decimal(2), month char(3), year decimal (4) );

13 Carnegie Mellon 15-415 - C. Faloutsos13 Complex types eg, Row Types: create row type Doc ( callnum varchar2(10), title char(20), authors list (varchar2(20)) ); create table document of type Doc;

14 Carnegie Mellon 15-415 - C. Faloutsos14 Complex types DML - insertions: insert into document values (‘QA123.45’, ‘DB systems’, set(‘Smith’, ‘Johnson’) );

15 Carnegie Mellon 15-415 - C. Faloutsos15 Inheritance single inheritance: create type Person ( ssn varchar2(10), name char(20)); create type Student (major varchar2(5)) under Person;

16 Carnegie Mellon 15-415 - C. Faloutsos16 Inheritance multiple inheritance: create type Teacher ( salary integer) under Person; create type TA under Student, Teacher;

17 Carnegie Mellon 15-415 - C. Faloutsos17 Inheritance multiple inheritance: constraints: one TA record corresponds to exactly one ‘Teacher’ and ‘Student’ record insertions/deletions/updates: appropriately propagated.

18 Carnegie Mellon 15-415 - C. Faloutsos18 Object Ids and references can define ‘object ids’ for each object, and use them, effectively as pointers.

19 Carnegie Mellon 15-415 - C. Faloutsos19 Query language extensions (recall:) create row type Doc ( callnum varchar2(10), title char(20), authors list (varchar2(20)) ); create table document of type Doc; find titles, (co-)authored by ‘Smith’

20 Carnegie Mellon 15-415 - C. Faloutsos20 Query language extensions select title from document where ‘Smith’ in authors;

21 Carnegie Mellon 15-415 - C. Faloutsos21 SQL-3 proposed extensions - overview complex types (sets, lists, multisets) inheritance (IS-A hierarchies) User Defined Functions (UDFs)

22 Carnegie Mellon 15-415 - C. Faloutsos22 UDFs create function author-count (adoc document) returns integer as select count (authors) from adoc; select title from document d where author-count(d) > 1

23 Carnegie Mellon 15-415 - C. Faloutsos23 UDFs UDFs: stay within the DBMS, for everybody to use!

24 Carnegie Mellon 15-415 - C. Faloutsos24 Detailed outline OO DBMSs OR DBMS –complex data types –inheritance –UDFs ORACLE-specific extensions Conclusions

25 Carnegie Mellon 15-415 - C. Faloutsos25 ORACLE-specific Large objects PL/SQL and UDFs

26 Carnegie Mellon 15-415 - C. Faloutsos26 ORACLE-specific Large objects, eg., video, images, 3d-MRI scans new data types:

27 Carnegie Mellon 15-415 - C. Faloutsos27 ORACLE-specific Large objects, eg., video, images, 3d-MRI scans new data types: LOB (=Large OBject) –BLOB: (up to 4Gb; binary: jpeg, mpeg,...) –CLOB: (up to 2Gb; character: english text) –NCLOB:(..............; multi-byte characters) –(LONG: similar, for backwards compatibility)

28 Carnegie Mellon 15-415 - C. Faloutsos28 ORACLE-specific stored procedures PL/SQL: a ‘C’-like language –too large to describe here (see book on reserve) –example of a stored procedure:

29 Carnegie Mellon 15-415 - C. Faloutsos29 ORACLE-specific SQL> create or replace procedure del-st-rec (s-id number) as begin delete from student where s-id = ssn; end del-st-rec; SQL> execute del-st-rec ( 123 );

30 Carnegie Mellon 15-415 - C. Faloutsos30 Detailed outline OO DBMSs OR DBMS –complex data types –inheritance –UDFs ORACLE-specific extensions Conclusions

31 Carnegie Mellon 15-415 - C. Faloutsos31 Conclusions OO and OR DBMS strive for –complex data types –inheritance –UDFs OR DBMSs: overwhelming market share (why?)

32 Carnegie Mellon 15-415 - C. Faloutsos32 Conclusions OR DBMSs: overwhelming market share (why?) –SQL is more standardized than OO query languages –legacy data are in SQL –more SQL programmers are available


Download ppt "Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications C. Faloutsos OO and OR DBMSs."

Similar presentations


Ads by Google