Reputation: 167
I need to design a parameter form. I have a form which will contain a list of competencies. The user will need to rate each competency. Example of a form where user will rate:
Competency 1 - Choose rating from 0-7
Competency 2 - Choose rating from 0-7
Competency 3 - Choose rating from 0-7
The rating of 0-7 is a radio button.
I want a parameter form to keep this rating, and if tomorrow the user wants to add a new rating like 8, he/she can do it from the form.
This will add a new radio button automatically on the form design.
I want to know how many tables will I need to design the parameter form? Two tables or One table?
(Note that I have about 10 parameter form to design- Can i use same table or each parameter form have its own table)
Which one is the best practice?
Upvotes: 0
Views: 27
Reputation: 29965
It depends. But you can use something like this:
Competences
~~~~~~~~~~~~~~~~
- competence_id INT NOT NULL AUTO INCREMENT
- competence_title VARCHAR
- competence_attr_1 ANYTYPE
Votes
~~~~~~~~~~~~~~~~~
- vote_id INT NOT NULL AUTO INCREMENT
- item_id INT -- Reference to an item, for which vote is done
- competence_id -- Reference to competence
- rating INT -- Rating mark
With this you will be able to add unlimited number of competences and use any rating on them.
Upvotes: 1