Never send an application to do a database's job! >:-)

Dawson, Michael wrote:

>Relations capture the design intent.  Meaning, you will allow only
>values from a parent table to be inserted into the child table.
>
>By placing these constraints on the database, you can ensure that any,
>and all, applications cannot bypass your intent by inserting values in
>the child table that don't exist in the parent table.
>
>Also, fk constraints can automate database actions.  For example, if you
>remove a category from a parent table, the database constraint's ON
>CASCADE DELETE "trigger" can remove all related records in the child
>table.  You don't have to perform two DELETE operations.
>
>As far as the design intent, and seeing it on paper, you can more-easily
>see what relationships are optional/mandatory one-to-many, one-to-one,
>or other options that are available per database platform.
>
>You can also consider it to be database-based error prevention.
>
>M!ke
>  
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Sams Teach Yourself Regular Expressions in 10 Minutes  by Ben Forta 
http://www.houseoffusion.com/banners/view.cfm?bannerid=40

Message: http://www.houseoffusion.com/lists.cfm/link=i:5:159480
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to