Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting reference from a newly inserted object

Re: Getting reference from a newly inserted object

From: jerry <jerry82006chen_at_gmail.com>
Date: 8 Jan 2006 03:42:22 -0800
Message-ID: <1136720542.425479.170880@g44g2000cwa.googlegroups.com>


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 - 05:42:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US