Re: Flamewar object databases vs. relational databases

From: Bob Badour <bbadour_at_golden.net>
Date: Sun, 3 Jun 2001 01:56:03 -0400
Message-ID: <QrkS6.805$En4.198135907_at_radon.golden.net>


>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 - 07:56:03 CEST

Original text of this message