[thelist] DB Schema Design

Matt Warden mwarden at gmail.com
Mon May 8 10:42:42 CDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hassan Schroeder wrote:
...
> Regardless, mixing attributes of different "things" in one table,
> simply because they have a common name, just feels wrong to me.

They are not different. They're all statuses. You seem to be viewing
status as an attribute, while I'm viewing status as an entity (it has
its own table, right?) with an attribute specifying its type.

However, I am beginning to see that this might be a gray area, and it
could completely depend on the universe of entities which these statuses
are describing. If they are very diverse things, perhaps it does not
make sense to put them in the same table.

> unless Customer and Product either had a super/subclass
> relationship, or both extended another object with a getStatus()
> method.

And they should, lest you duplicate code.

- --
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

iD8DBQFEX2bxrI3LObhzHRMRAl/BAJ9ejxtZaYDynR4mWl/k9OmSubiKEQCeOemW
25Q3FrqoMn36lFyYLbb7CC4=
=MgYA
-----END PGP SIGNATURE-----



More information about the thelist mailing list