Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9291567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:40:40+00:00 2026-06-18T20:40:40+00:00

When using foriegn keys, I am not sure if I am suppose to use

  • 0

When using foriegn keys, I am not sure if I am suppose to use foriegn keys in two tables where it contains the same field. For example:

Option Table:

OptionId (PK auto)  OptionType
1                   A-C 
2                   A-D
3                   A-E

Question Table:

QuestionId (PK auto)  Question  OptionId (FK Option)
1                      2+2       2
2                      3+3       1

I make the OptionId in the Question Table a foreign key but am I suppose to make the OptionId in the Option Table a foreign key as well referencing to the Question Table?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T20:40:42+00:00Added an answer on June 18, 2026 at 8:40 pm

    No.

    A foreign key is a constraint: it is intended to insure database integrity. You wouldn’t want someone to be able to delete an Option that a Question is joined to, as that question would no longer be valid. However, it would make perfect sense to delete a Question even though the Option it was joined to still exists — that Option may well apply to other existing or future questions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It appears that SQLite does not enforce foreign keys by default. I'm using sqlitejdbc-v056.jar
I'm using SQLite with C# and have some tables with foreign keys defined. Now,
I have a table Scholars, that has many foreign keys to look-up tables such
I am new to oracle, I have created two tables using following queries, CREATE
THE INFO Currently I have two tables I am working with- a POST table
So while we're using foreign keys in our current project, I've heard the argument
When I am using Foreign Keys in MySQL, I will get an error if
Is there a way using SQL to list all foreign keys for a given
I am using Django's comment framework which utilizes generic foreign keys. Question: How do
I've been tinkering a bit with the option to include foreign keys in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.