Below is a basic version of the database:

Questions  

uid - primary key - int   

qid - primary key - identity - bigint   

img - nchar   

postdate - datetime   

title - nchar   

UserProfile   

Email - nchar  

UserId - primary key - idendity - int   

Votes  

qid - primary key - bigint   

uid - primary key - int  

votedate - datetime  

vote - bit  

the problem I am having is I want uid of Votes to be the foreign key from UserTable and qid of Votes being foreign key from Questions (qid obviously). When I try to add relationships with WebMatrix I keep getting the error "The referenced table must have a primary or candidate key." What am I doing wrong?