or - 1 Object-Relational Databases User-Defined Types...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Object-Relational Databases User-Defined Types Object ID’s Nested Tables 2 Merging Relational and Object Models ◆ Object-oriented models support interesting data types --- not just flat files. ◗ Maps, multimedia, etc. ◆ The relational model supports very- high-level queries. ◆ Object-relational databases are an attempt to get the best of both. 3 Evolution of DBMS’s ◆ Object-oriented DBMS’s failed because they did not offer the efficiencies of well- entrenched relational DBMS’s. ◆ Object-relational extensions to relational DBMS’s capture much of the advantages of OO, yet retain the relation as the fundamental abstraction. 4 SQL-99 and Oracle Features ◆ SQL-99 includes many of the object- relational features to be described. ◆ However, different DBMS’s use different approaches. ◗ We’ll sometimes use features and syntax from Oracle. 5 User Defined Types ◆ A user-defined type , or UDT, is essentially a class definition, with a structure and methods. ◆ Two uses: 1. As a rowtype , that is, the type of a relation. 2. As the type of an attribute of a relation. 6 UDT Definition CREATE TYPE <typename> AS ( <list of attribute-type pairs> ); ◆ Oracle syntax: 1. Add “OBJECT” as in CREATE … AS OBJECT. 2. Follow with / to have the type stored. 7 Example: UDT Definition CREATE TYPE BarType AS ( name CHAR(20), addr CHAR(20) ); CREATE TYPE BeerType AS ( name CHAR(20), manf CHAR(20) ); 8 References ◆ If T is a type, then REF T is the type of a reference to T , that is, a pointer to an object of type T . ◆ Often called an “object ID” in OO systems....
View Full Document

This note was uploaded on 02/21/2011 for the course CS 147 taught by Professor Dr.jeff during the Fall '07 term at SUNY Buffalo.

Page1 / 50

or - 1 Object-Relational Databases User-Defined Types...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online