1 / 13

OBJECTS OBJECT IDENTITY REFERENCE TYPES

OBJECTS OBJECT IDENTITY REFERENCE TYPES. Object identifier - oid. FILE SYSTEM. Data object. Object identifier - oid. DBMS. ?. FILE SYSTEM. Data object. Differences between URL and Oid. Oid. URL. Notions of equality.

Télécharger la présentation

OBJECTS OBJECT IDENTITY REFERENCE TYPES

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OBJECTS • OBJECT IDENTITY • REFERENCE TYPES

  2. Object identifier - oid FILE SYSTEM Data object

  3. Object identifier - oid DBMS ? FILE SYSTEM Data object

  4. Differences between URL and Oid Oid URL

  5. Notions of equality deep equal :Two objects having the same type are defined, if and only if:

  6. Notions of equality Shallow equal: two objects that have the same reference type ( if they both refer to the same object).

  7. Notions of equality Example: create table frames (frameno integer, image jpeg, category integer); create table categories (cid integer, name text, lease_price float, comments text); create type theater_t as row (tno integer, nametext, address text, phone integer) create table theaters of theater_t; create table nowshowing (film integer, theaterref(theater_t), start date, enddate); create table films (filmno integer, title text,starssetof(text), director text, budget float); create table countries (name text, boundarypolygon, population integer, language text)

  8. Notions of equality ROW(538, t89, 6-3-97, 8-7-97) ROW(538, t33, 6-3-97, 8-7-97) deep equal Shallow equal

  9. INHERITANCE • Defining Types with Inheritance • Binding of Methods • Collection Hierarchies, Type Extents, and Queries

  10. Defining Types with Inheritance Instance: THEATER tno integer Name text address text phone integer THEATER-CAFÉ Menu text tno integer Name text address text phone integer supertype subtype CREATE TYPE theatercafe UNDER theater (menu text)

  11. Defining Types with Inheritance Note: • the inheritance mechanism creates rlationship between the subtype and supertype.(an object of the subtype is also considered to be an object of the supertype.) • The substitution priciple: given a supertype A and a subtype B, it always possible to substitute an object of type B into a legal expression written for objects of type A, without producing type errors. • Inheritance can also be used for atomic types, in addition to row types.

  12. Binding of Methods Instance: INMAGE JPEG-IMAGE supertype subtype The display() method for IMAGE does not work for JPEG images!!! CREATE FUNCTION display(jpeg_image) RETURNS jpeg_image AS EXTERNAL NAME ‘/a/b/cjpeg.class’ LANGUAGE ‘java’;

  13. Collection Hierarchies, type Extents, and Queries

More Related