Question

You are asked to build a database to track surveys that will be sent out to customers and their responses to those surveys. Customers can respond to a survey only once. List the table names as well as...

You are asked to build a database to track surveys that will be sent out to customers and their responses to those surveys. Customers can respond to a survey only once.

List the table names as well as the primary and foreign keys in those tables. No other columns other than the keys need to be listed.

Example expected output style:

[table1name]
column1name (PK)

[table2name]
column1name (PK)
column2name (PK)
column3name (FK)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

-- Below is queries for creating db and corresponding tables.

Create database Survey;

create table surveydetails (id int primary key, option1 varchar(20), option2 varchar(20), option3 varchar(20));

--above is survey details table having survey details. currently i have added only 3 options and can be increased based on servey.

Create table customer (SSN varchar(20) Primary key, firstName varchar(20),Lastname varchar(20),PhoneNumber varchar(20),SurveyId INT, foreign key (surveyid) references surveydetails(id));

--Above is customer tabke which store basic information of customer and unique idenfied by SSN which will have only one per customer. And also contain one survey id to refer survey table.

We need to make sure customer to enter SSN so he can only do survey only once. we also can use email address if required as unique identifier filed.

Add a comment
Know the answer?
Add Answer to:
You are asked to build a database to track surveys that will be sent out to customers and their responses to those surveys. Customers can respond to a survey only once. List the table names as well as...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • First, read the article on "The Delphi Method for Graduate Research." ------ Article is posted below...

    First, read the article on "The Delphi Method for Graduate Research." ------ Article is posted below Include each of the following in your answer (if applicable – explain in a paragraph) Research problem: what do you want to solve using Delphi? Sample: who will participate and why? (answer in 5 -10 sentences) Round one questionnaire: include 5 hypothetical questions you would like to ask Discuss: what are possible outcomes of the findings from your study? Hint: this is the conclusion....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT