Check Constraint vs. Foreign Key Constraint
Date: 6 Aug 2001 10:18:06 -0700
Message-ID: <be820bbe.0108060918.71f3c250_at_posting.google.com>
My question has to do with (1)which method is faster and (2)which
method better adheres to good database design.
This is my dilemma. I can't decide which method is better. For
example, in the Vendors table, I can have either 4 or 5 CHECK
constraints or I can create 4 or 5 tables and use Foreign Key
relationships to restrict data entry. Each vendor is either a
"Manufacturer" or a "Distributor". For the field VendorType, would it
be better to write a check constraint ensuring the type to be entered
as "Manufacturer" or "Distributor" or should I create a new table
called VendorTypes and add two columns, TypeID and TypeDescription,
and check the field using a Foreign Key relationship?
What are your thoughts on the CHECK CONSTRAINT versus FOREIGN KEY
entity relationship?
Thanks for any input.
J Lowry Snow Received on Mon Aug 06 2001 - 19:18:06 CEST