Contacts with new attributes
Posted: Thu Apr 07, 2005 2:25 am
Hi,
I'm currently desiging something of a membership database. There are a couple of rather large design problems. I want to focus on one at the moment.
There are people, and there are organisations. A person may be a member of an organisation, or they may be an entity on their own. They can belong to multiple organisations.
I'm going to have a universal contacts table, and there will be two (at least) types - Person, and Organisation.
The problem is, that the information that the users will want to store for a contact entry will vary and grow. Eg, tomorrow they may say "we also want to record the marital status of the person". Two weeks later, "we want to know the style of haircut each person has". So, I need to modify the database, add those fields to the tables, then update the php to allow for viewing, editing and adding these new fields.
Is there a better way? I'm considering an attributes table, where users can define their own new, simple attributes. This could get long though, because it's essentially a pseudo database inside an actual database. I'm sure this problem must have been crossed before.
Do you just say "I have to make the changes"? Or have you thought of good ways to implement this so that users have some control over what attributes are stored related to each entry?
I'm currently desiging something of a membership database. There are a couple of rather large design problems. I want to focus on one at the moment.
There are people, and there are organisations. A person may be a member of an organisation, or they may be an entity on their own. They can belong to multiple organisations.
I'm going to have a universal contacts table, and there will be two (at least) types - Person, and Organisation.
The problem is, that the information that the users will want to store for a contact entry will vary and grow. Eg, tomorrow they may say "we also want to record the marital status of the person". Two weeks later, "we want to know the style of haircut each person has". So, I need to modify the database, add those fields to the tables, then update the php to allow for viewing, editing and adding these new fields.
Is there a better way? I'm considering an attributes table, where users can define their own new, simple attributes. This could get long though, because it's essentially a pseudo database inside an actual database. I'm sure this problem must have been crossed before.
Do you just say "I have to make the changes"? Or have you thought of good ways to implement this so that users have some control over what attributes are stored related to each entry?