[thelist] DB Schema Design

Hershel Robinson hershel at galleryrobinson.com
Sun May 7 14:21:28 CDT 2006


> Sure it is. That's like saying 1000 different classes (in the OOP sense)
> is the same as having 1000 instances of the same class.
> 
> 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.

Well said.

> Would you split /products/ into different tables based on their category?

Interesting.

> To me the first says something's wrong: it's a symptom of separating
> data that should be in the same table.

OTOH, if one is using a good MVC framework, then using separate tables 
becomes a simple matter of defining a relationship (between table X and 
X_states) and then the MVC logic handles the SQL automatically. :)

> Not to mention that having all those extra tables is going to make the
> data model more difficult to get acquainted with, which drives up your
> client's cost significantly.

Good point.

Thanks,
Hershel

-- 
Gallery Robinson Web Services
http://web.galleryrobinson.com/



More information about the thelist mailing list