The table could look similar to this for examples sake and is called forum_user_info:
Code: Select all
id - name_first - name_last - country - gender - birthdate - email_settings - username - emailCode: Select all
When being presented with a chance to overtake, and the lanes are double lined, do you overtake or do you obey the road rules?What I want to know is, how would I best layout the database to handle this considering these rules:?
1 - The questions must never be asked twice to the same user
2 - The answers must represent a character trait of the user, so the answers must be interprited by the system in a way to emphasise this
3 - They must be able to be searched very quickly to compare one user against another
What I mean by questions 2 and 3 are basically described like this:
I want to be able to look at a users responses to the questions and write a script that says something like 'user X answered question Y with a negative answer, so they are 'character_trait''.
The user can then say, show me all users that have a character trait of 'angry' (as an example)
I hope somebody here can help me out with a design for the database, and I want to imagine the site is very successful and has say, up to 50,000 members.
Some more random thoughts I've been having on the topic:
Do I create a seperate table for each question?
If I do create a seperate table for each question, how do I let the system know the user has taken that question?
Do I have a script that checks through the whole table for responses?
Considering there could be 10's of thousands of responses, this could get slow with thousands of users searching at once for example.
Any advice appreciated dearly!
Rob