in reply to (OT) database design question

Foreign keys are the way to describe relationships between two tables. They are simple, optimized within the engine, and are self-commenting. Check constraints should be limited to when you simply cannot do it any other way. (And, in most of those cases, re-normalizing your structure eliminates the need for check constraints.)

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.