db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Segel" <mse...@segel.com>
Subject RE: Delete with cascade...
Date Thu, 22 Oct 2009 19:33:09 GMT
Like I said, I roll my own DAO because its always going to be more
efficient, if done properly. ;-)

With respect to ease of use, I'm confused.

You only need to figure out the metadata once. It won't change, if rarely.
Then you can reuse it all the time. 

All databases (relational databases) have to have some form of metadata and
metadata access so once you figure out the logic for a database, you can
easily port the logic to any other relational database.

Then you don't have to worry if that vendor supports truncate/cascade or how
they support it.

I mean derby does support the concept but its done differently.



> -----Original Message-----
> From: Preben Mikael Bohn [mailto:preben@chin.dk]
> Sent: Thursday, October 22, 2009 1:20 PM
> To: Derby Discussion
> Subject: Re: Delete with cascade...
> Hi Mikey
> > First, don't use Hibernate. Sorry, but from practice a well written DAO
> will
> > be better performance-wise. Maybe look at JPA?
> Well, since Hibernate implements JPA that's exactly what I do... ;-)
> > You should be able to query and find these constraints. Then you can
> > programmatically determine which tables to delete records from and in
> which
> > order.
> Yes, that's true... I guess I just hoped for something simple as
> postgres' truncate/cascade... :-)
> Best regards Preben

View raw message