sql server - SQL Questionaire Database Design (EAV Model) Issue -
im building friendship site try , match users share similar interests.
- i have 25 questions defined answers(drop down answers) user must fill out.
- im using entity–attribute–value model store users id question id answered id user selects.
- i use count function see users have matches profile.
current table structure
- question table
- answer table
- question_answer_user table
the problem im running have 2 question , im not sure best place store them is.
- the question country?
- the question state?
im not sure if should store them other 25 questions or if should store them in 3 separate tables seen below.
- country table
- state table
- user_country_state table
there going alot of answer entries these 2 questions. example there 25 countries user can answer , total of 900 states / provinces user can answer from.
i want able consider users location similarity count im not sure best approach incorporate is?
i think selected country , state should live in user table, along other necessary user information such name , email address. don't think belongs in answers table, work there.
for list of options user select when setting account, storing them in pre-defined q , tables place any. depends, guess, on how data , functionality broken apart aren't crossing responsibility boundaries q&a table storing survey-type answers user-setup answers.
Comments
Post a Comment