Do I need 3-field pkey if business rules take care of it?

T

Tim Cali

I have a table:

tblAnswers
AnswerID
PersonID
QuestionID
PeriodID
Answer

AnswerID is an autonumber. Answer is based on PersonID, QuestionID, and
PeriodID. I created a primary key based on those 3 ID's, and my question is,
do I really need to do that if I have enforced rules at the form level?

To put it another way, if I create a table where a series of fields should
make up one unique item for that table, do I leverage the strength of
combining multiple fields into a primary key (which gives me extra
"insurance" in case my business rules should fail), or do I simply rely on
business rules set up at the form level to handle that?

Thanks.
 
T

Tim Cali

So is this correct?

View -> Indexes

Element PersonID
QuestionID
PeriodID
Primary Key AnswerID

The PersonID Field Name property "Unique" has been set to "Yes"
There are no property values available for QuestionID or PeriodID.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top