Re: [Maypole] Status table relationship

From: Brian Glass (brian at glassbrian.com)
Date: Fri Sep 24 2004 - 11:35:02 BST


Perrin Harkins wrote:

> Brian Glass wrote:
>
>> A car has a color. There are a list of colors in the status_code
>> table all with the status_type column set to color. A car has_a
>> color. A person can be either a driver or a passenger. There are a
>> list of person roles in the status_code table all with the
>> status_type column set to person_role. A person has_a person_role.
>
>
> I've seen this kind of table design used before, and it was always
> regretted later. Having one big lookup table for everything might
> sound like a good idea at first, but it generally makes your life more
> complicated than simply using separate tables and it hurts the
> performance of your database.

Perhaps you're right.

I did have a good reason for it though. I want to be able to have
user-defined statuses and status types. I'm currently using tables for
each status type right now. I was going to convert everything to a
single table system because to have a unified status thing.

I think maybe I'll take your advice and leave all the predefined
statuses in separate tables and come up with a separate system for the
user-defined types. It'll have to be based on custom method calls anyway.

Thanks.

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT