When referential integrity is enforced by the database the logic you program into your 
application must also manage referential integrity properly, or your users will see 
errors returned
from the database whenever referential integrity is violated.  So if you do a good job 
of writing your application you have redundancy at the cost of speed without any real 
benefit in
that case.  On the other hand if you write flaky applications without referential 
integrity being enforced by the database, your users can (and will) screw up the data 
pretty quickly.
My preference is to write applications properly and not have the database enforce 
referential integrity, which optimizes performance and speeds development time too.  
But whenever
there's going to be more than one application using the same database, or (sometimes) 
if there's going to be more than one programmer building the application, or there's 
anybody who has
direct access to the database and you don't trust them to be careful and smart about 
what data they modify, or if for some reason the data need to be doubly guarded (such 
as on the whim
of some anal-retentive DBA, or middle manager wanting to cover his butt) then you have 
a reason to sacrifice performance a little bit for the sake of redundant protection of 
referential
integrity.

Karl Simanonok

>>Hello,
>>
>>We are about to start a fairly large project using mysql on Unix
>>as our DB. I hear there is no transaction support, you can't do
>>'sub selects' (Is that the same thing as a sub-query?), and that it is
>>in some way 'single threaded' and/or unsuitable for multiuser
>>environments...?
>>Could someone with some experience explain/clarify these things and
>>possibly provide some examples of where we might run into trouble...?
>>
>>Thanks in advance for any help you can offer.
>>
>>Mike Bannister
>>geekteam.com

>The thing that scared me about MySql is the lack of foreign keys.  It
>allows you to define them (as required by the ANSI SQL standards I
>believe), but does not actually enforce or do anything with
>them.  According to their documentation, they do this to speed up the
>database since integrity checks take time.  It also stated that programmers
>should not be lazy, and should take the time to write any integrity checks
>they feel they need into their programs.  I understand this position, to
>some extent, but I find it both arrogant and dangerous.  Data integrity,
>IMHO, should be handled at the database level.
>
>My $.02
>
>Judah

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to