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
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 asktom.oracle.com says on the subject.