Re: No future for DB2 - slightly off-topic, discusses what people are being taught at uni
Posted in 2005
"rkusenet" <rkusenet@yahoo.com> wrote: > > So creating an index on a foreign key should not be automatic. > While I agree with you, I would add that for code lookups like Title (Mr, > Mrs, Ms) I would rather go with a check constraint than a FKY. Anything with a low > cardinality and known static values should be handled in a check constraint. At least I > would. Yes, but Title is a classic example of where it's not static. What about Fr., Rev., Maj., Capt., Col., Gen., Sr., Sir, Lord, Madame, Master, Miss, Rev., H.(is/er) E.(xcellency) and that's only in English? If you're writing an app for a bilingual or trilingual country, the number of possibilities is beyond a simple check constraint, which is suited to the likes of Gender, but not a title field. Paul... -- plinehan __at__ yahoo __dot__ __com__ XP Pro, SP 2, Oracle, 9.2.0.1.0 (Enterprise Ed.) Interbase 6.0.1.0; When asking database related questions, please give other posters some clues, like operating system, version of db being used and DDL. The exact text and/or number of error messages is useful (!= "it didn't work!"). Thanks. Furthermore, as a courtesy to those who spend time analysing and attempting to help, please do not top post.