T
TonyT
Hi all,
Is there a definitive view on whether to allow null's in foreign keys, or
whether it is better to have a bogus entry in the parent table to substitute?
My database has UK address' for customers with Parent tables for Road, Town,
Area/Region & County, then child fields in the Customer Table. More often
then not Area has no value, but when it does have a value it is often the
same as Town.
Currently I have required=False for each child FK, which makes a few queries
troublesome, but then so does coding around null entries in the bound
comboboxes for entering the data.
Which way is best?
And is having Town and Area FK's pointing to 1 Parent Table (Town) a bad
idea or not?
(Most of my customers work within a 60 mile radius of their base, so they
are always fairly limited entries in County & Area.)
opinions appreciated,
TonyT..
Is there a definitive view on whether to allow null's in foreign keys, or
whether it is better to have a bogus entry in the parent table to substitute?
My database has UK address' for customers with Parent tables for Road, Town,
Area/Region & County, then child fields in the Customer Table. More often
then not Area has no value, but when it does have a value it is often the
same as Town.
Currently I have required=False for each child FK, which makes a few queries
troublesome, but then so does coding around null entries in the bound
comboboxes for entering the data.
Which way is best?
And is having Town and Area FK's pointing to 1 Parent Table (Town) a bad
idea or not?
(Most of my customers work within a 60 mile radius of their base, so they
are always fairly limited entries in County & Area.)
opinions appreciated,
TonyT..