[thelist] DB Schema Design
Matt Warden
mwarden at gmail.com
Sun May 7 15:53:08 CDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hassan Schroeder wrote:
> Matt Warden wrote:
>
>
>>If the table is truly describing a status, then there is absolutely
>>nothing wrong with an additional attribute that describes the group to
>>which it belongs. In fact, this model happens *all the time* in
>>relational design: it's called a many-to-one relationship.
>
>
> True enough, but doesn't this assume that all the objects sharing
> this status table will forever have exactly one "status"? Suppose
> an existing object is extended (or a new one added) that requires
> a primary and secondary status?
No, this does not assume a single status.
product
- ----------------
id
prim_statusid
sec_statusid
>>Would you split /products/ into different tables based on their category?
>
>
> If they have wildly disparate attributes -- yes :-)
The analogy would require only the category were different.
- --
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFEXl40rI3LObhzHRMRAn+QAKDpR7oh2Pvq5hJzfw/Y97MSJ5aTywCgmF+I
D7hBkNPJOBNm/FGHg423AOE=
=ljMy
-----END PGP SIGNATURE-----
More information about the thelist
mailing list