Need input on DB/table design

I'm building a site.. Dah!! and it requires different skills for different jobs in different states. the site will start off in only one state but I want to make sure I'm ready for many states. I'm thinking of a generic skills table with columns skill1 .... skillN. then another table with columns state, job type, skill name, skill column mapping to the column in the skills table. I would dynamicly build the table to select the skills based on state job type. I'm doing this one because I don;t know what all the skills are yet. and I'm sure I will have to add some along the way either to the state I start in or when adding new states. and I don;t want to have to hard code each state.

My question is.. Is this a bad idea!! is there a better way of doing it?

spokra wrote:

I'm building a site.. Dah!! and it requires different skills for different jobs in different states. the site will start off in only one state but I want to make sure I'm ready for many states. I'm thinking of a generic skills table with columns skill1 .... skillN. then another table with columns state, job type, skill name, skill column mapping to the column in the skills table.

: :

My question is.. Is this a bad idea!! is there a better way of doing it?

Looks like this would do it

table states columns: id and description, etc

table skills columns: id and description, etc

table state_skills columns: state_id, skill_id

Then link them up with something like

states model   :has_and_belongs_to_many :skills

skill model   :has_and_belongs_to_many :states

Stephan