| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Flamewar object databases vs. relational databases
>CARL_BLOCK {
>dbh.execute("begin transaction");
>carl_id = dbh.select("select carls_id_sequence.nextval from dual");
>errno = dbh.execute("insert into carls_table(id,b,c,d) values(" + carl_id
> + "'someval','someotherval','et cetera')");
>test_for_rollback(errno);
>errno = dbh.execute("insert into other_table(id,f_id,b,c,d)
ues(
> other_id_seq.nextval" + carl_id +
> "'lunchtime','is an','illusion')");
>test_for_rollback(errno);
>dbh.execute("commit");
>} // end CARL_BLOCK
You fell for Carl's trap. In Java, you might only do:
Connection.Save(SomeObject)
where the SomeObject object variable has a reference to a dependent object variable. The Save method should (and would) encapsulate saving SomeObject and the dependent.
Carl will now pick nits with the guts of your code while not showing the guts of any of his. Received on Sun Jun 03 2001 - 00:56:03 CDT
![]() |
![]() |