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 05:03:42 -0800
Message-ID: <1136652142.870586.246340@z14g2000cwz.googlegroups.com>


Thanks for your reply and helpful suggestions To Jim:
I think the problem is not the constraints between tables. The reason why I choose object-relational mapping is the consideration about the flexibility of further modification. If I use a lot of constraints and make all of them fullfil third normal form, the flexibility of my database will become poor and complexity is also increased. But by using orbject in Oracle, the constraints is maintainted by DBMS with OID. Now my problem is how to get object reference just after I insert an object from a JAVA program through JDBC. To Daniel:
I use Oracle designer and JPublish to generate the architecture of my program.
the associate DDL is as follows:

PROMPT Creating Object Type 'MyObj1'
CREATE OR REPLACE TYPE MyObj1 AS OBJECT
 (
 PROPERTY1_LIST MyObj2_List
 )

PROMPT Creating Object Type 'MyObj2'
CREATE OR REPLACE TYPE MyObj2 AS OBJECT
 (
 Title VARCHAR(20)
 )

PROMPT Creating Collection Type 'MyObj2_List' CREATE OR REPLACE TYPE MyObj2_List AS TABLE OF REF MyObj2

PROMPT Creating Table 'TB_MyObj1'
CREATE TABLE TB_MyObj1 OF MyObj1
 NESTED TABLE MyObj2_LIST STORE AS TB_MyObj1_NT90
/

PROMPT Creating Table 'TB_MyObj2'
CREATE TABLE TB_MyObj2OF MyObj2
/
Received on Sun Jan 08 2006 - 07:03:42 CST

Original text of this message

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