How would I set up a sql server database based on the following problem I will be creating a poll based on 9 dimensions that compare two companies.
honda yamaha
performance
features
reliability
conformance
durability
serviceability
aesthetics
safety
other perceptives
The values stored would be 1 or 0 so the values can be totalled. The user will be using a web page
and will select a radio button per dimension for either honda or yamaha. Would this work
tbl_companies
companyid int pk
companyname varchar
tbl_results
resultsid int pk
p int --performance
f int --features
r int --reliability
c int --conformance
d int --durability
s int --serviceability
a int --aesthetics
sf int --saftey
op int --other perceptives
companyid int -- fk to tbl_companies.companyid
userid int -- fk to tbl_users.userid
tlb_users
userid int pk
username varchar
userip varchar

tables setup
Bosse A
Or just add a UNIQUE constraint to the userid column
JeffEngel
That would get the job done. I would have used more descriptive column names so that they were more readable, but I can't find any explicit fault with that architecture. People might argument pure data modeling, but this will work.
One thing to consider here. Your design will allow the same user to submit multiple surveys, because there is no restriction that enforces a particular user can only have a single survey, but that might not fit your requirements.
Kevin Lew