Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting reference from a newly inserted object
Thanks for your kindly and usefule suggestions
I think the problem might not about the design of database's schema,
the reason I choose not to use relational paradigm but object paradigm
is for further modification consideration.
The ORDBMS provides more flexible for schema change, the constraints
between tables is further maintained by DBMS with OID.
My problem is how to get object's reference when insert it into a
table. You can not get object's reference until insert it to DB, but
you got nothing when excute a insert statement by
PrepareStatement.excuteQuery(). So, I want to know which object is the
object I just inserted in object table.
here is some example schema related to my question:
PROMPT Creating Object Type 'PROJECTS'
CREATE OR REPLACE TYPE PROJECTS AS OBJECT
(PRJ_TITLE VARCHAR2(60)
,URL_LINK VARCHAR2(100)
,ObjsList OBJS_LIST
/
PROMPT Creating Object Type 'MYOBJ'
CREATE OR REPLACE TYPE MYOBJ AS OBJECT
(OBJ_TITLE VARCHAR2(60)
)
/
PROMPT Creating Collection Type 'OBJS_LIST'
CREATE OR REPLACE TYPE OBJS_LIST AS TABLE OF REF MYOBJ
/
PROMPT Creating Table 'TB_MYOBJ'
CREATE TABLE TB_MYOBJ OF MYOBJ
/
PROMPT Creating Table 'TB_PROJECTS'
CREATE TABLE TB_PROJECTS OF PROJECTS
NESTED TABLE ObjsList STORE AS TB_PROJECTS_NT22
/
Received on Sun Jan 08 2006 - 06:53:52 CST
![]() |
![]() |