At 10:09 24.07.00 , you wrote:
>The question of DB constraints on EJB maintained code is not just an EJB
>thing but rather something that has to be considered in the build of an
>application (EJB, CORBA, whatever..).
>
>The obvious pro is that the 'belt and braces' approach gives an extra
>level of safety which has come in handy as Robert has pointed out.
>
>The con is, of course, the DBMS overheads and the overhead in maintaining
>the constraints. Specifically:
>- any insert/update/delete activity may have the overhead of the DBMS
>constraint checking (foreign key constraint) depending on whether the row
>has RI. The more foreign keys that are changed, the higher the overhead
>- in testing and production maintenance, the need to load the tables in the
>right order, or disable and re-enable the constraints in the right order if
>any data is bulk loaded completely
agree completely here. that's why you see ecommerce systems like intershop
not using RI constraints at all (although built on top of oracle). however,
I doubt that you could enforce the same integrity rules more efficiently at
the ejb layer. I think the original question was where to enforce
constraints if one decides to do so.
>Personally, having unique constraints is fine but having RI constraints can
>reduce the performance of OLTP systems. To a certain degree the fact that
>we are modularising the code to maintain objects (and hence rows in the
>database) helps us to localise errors. I think that one could use
>constraints in the development phase (to check for logic errors) and even
>in production (if the transaction rate is not that high). However if
>performance drags as a result of the RI , it's the first thing I'd dump..
>
>cheers,
>
>Eddie
>
>
(-) Robert Kr�ger
(-) SIGNAL 7 Gesellschaft f�r Informationstechnologie mbH
(-) Br�der-Knau�-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".