Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006

    Unanswered: accessing object types in oracle.


    I have few queries regarding accessing object types in oracle.

    1) How can i pass a particular object of some type in a function and manipulate its value int function using some checks then after returning from the function manipulated value of object should be visible.

    2) How to use variable of super type like in following case if i declare a variable to type Student_t then using that variable how can i access attribute name of Person_t.

    If there is no way todo this then what is the best method for passing all the attributes of both types in a function using for some processing in Databases.

    CREATE TYPE Person_t AS OBJECT ( ssn NUMBER,name VARCHAR2(30),address VARCHAR2(100)) NOT FINAL;

    CREATE TYPE Student_t UNDER Person_t ( deptid NUMBER,major VARCHAR2(30));

    Pls help me i have donen alot of R&D on it but got nothing. Thanks in advance

  2. #2
    Join Date
    Jun 2004
    Liverpool, NY USA
    Object types are a nice idea for applications, but I have NEVER seen them used in serious table design. It is much easier and cleaner to store the information in a linked table. See what Tom Kyle of says on the subject.

    If you are not talking about using an object type in a table, my apologies.
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Sep 2004
    London, UK
    1) Pass the object, manipulate it, pass it back. What isn't working?

    2) Student_t has an attribute NAME, Person doesn't.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts