in reply to Creation Suggestion needed... please

It sounds like you've started coding without thinking about the design, and frankly, it sounds like you would benefit from more than just "an idea" now that you are stuck.

But in the spirit of careful-what-you-wish-for, here's an idea:

Add a column "plan_id" to your plan table, this will link to tables described below.

Make a third table called "features", and include these columns

Make a fourth table called "plan_features", and include these columns

The plan_features table links the plans table to the features table in a many-to-many relationship.

Make a fifth table called "feature_valid_values", and include these columns

This table contains valid values for each feature, such as "yes", "no", "unlimited". You don't need this table if you don't care what values are used for each feature.

Can you see how this hangs together? The idea is that each distinct set of information (groups, plans, features, feature values) has its own identity, and relates to other sets of information in a specific way.

  • Comment on Re: Creation Suggestion needed... please