Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting reference from a newly inserted object
"jerry" <jerry82006chen_at_gmail.com> wrote in message
news:1136668671.497077.315420_at_o13g2000cwo.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
> /
>
You are wrong, but you don't want to believe it. You can use the relational
model. (underneath it is relational )If you don't have a primary key then
you have a broken design. If you don't know your requirements ahead of time
then you haven't done the job correctly. Yes, requirements change; the
relational model can accommodate what you want you just are too enamored
with Java.
Jim
Received on Mon Jan 09 2006 - 09:25:42 CST
![]() |
![]() |