1 / 7

More Object Database Concepts

More Object Database Concepts. Basic Functions and datatypes. Value, DREF and REF VARRAY. Value (returns value of a row). SQL> select value(p) from person p; VALUE(P)(PID, FIRSTNAME, LASTNAME, DOB) ------------------------------------------------------------------

astro
Download Presentation

More Object Database Concepts

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. More Object Database Concepts

  2. Basic Functions and datatypes • Value, DREF and REF • VARRAY

  3. Value (returns value of a row) • SQL> select value(p) from person p; VALUE(P)(PID, FIRSTNAME, LASTNAME, DOB) ------------------------------------------------------------------ PERSON_T('121111111', 'Joe', 'Smith', '21-OCT-61') PERSON_T('121222222', 'John', 'Kelsey', '15-DEC-66')

  4. REF (returns the address of the row) SQL> select ref(p) from person p where lastname='Grand'; • REF(P) ----------------------------------------------------- 000040030A003C0F3289B74EAC4CA1BB4D0DD5C4F1F78900000017260

  5. DEREF (given a reference to a row, gets the row); • SELECT DEREF(s_obj.super) INTO p_obj FROM DUAL;

  6. Dual: dummy table • SQL> select sysdate from dual • SYSDATE • --------- • 22-SEP-03

  7. VARRAY: Variable length array • CREATE OR REPLACE TYPE student_array AS VARRAY(50) OF REF student_t;

More Related