Fedor Karpelevitch wrote:
> I do not know very many databases but of those I know only Oracle supports
> CASCADE for example (do you know others?), does MySQL?, etc...

MySQL does not trouble itself such baroque and performance imparing features ;-)
No transactions, no foreign keys, no constraints, no triggers... pure readonly
performance. Just what you need for a running a website (but not a web-interfaced
application)

> I think we do not need to support it HERE, I believe in most cases it would
> be preferrable to perform appropriate action (i.e. cascade delete)
> programmatically in java. It might even Make sense to add methods such as
> doDeleteCascade to Peers so that it does the cascade delete and doDelete
> will raise an exception if you are trying to delete a row with child
> records.

We have the meta information, so we might attempt doing that. But on 
transaction-less db engines, it's still failure prone. The good thing
is that it would minimise the programmer's error factor.

> Alternatively we can add a parameter to doDelete and doUpdate to
> tell it whether it should be cascaded or not. I think this way you'll have
> much better and granular control over this (dangerous) behaviour. Makes
> sense?

+1. 

The crucial part is to fall back to programmatic cascading only when the
DB does not support cascades.

Rafal

--
Rafal Krzewski
Senior Internet Developer
mailto:[EMAIL PROTECTED]
+48 22 8534830 http://e-point.pl


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to