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 9218321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:50:07+00:00 2026-06-18T02:50:07+00:00

I have 5 db tables but the issue I have is with the Student_Answer

  • 0

I have 5 db tables but the issue I have is with the Student_Answer Table, I do not know if I should include the SessionId field or not in that table because we will know which session each question belongs to through foreign keys. I thought I may as well ask to make sure:

Below are tables:

Session Table

SessionId (auto PK) SessionName
1                   DOEEO
2                   EFOEO
3                   EOEOW

Question Table:

QuestionId (Auto PK) QuestionNo  QuestionContent  SessionId (Fk)
1                    1           Question 1       1
2                    2           Question 2       1
3                    3           Question 3       2
4                    4           Question 4       2           
5                    5           Question 5       3

Answer Table:

AnswerId (Auto PK)  Answer  QuestionId(Fk) 
1                   A       1
2                   C       1
3                   B       2
4                   C       3
5                   A       4
6                   D       5
7                   E       5

Student Table:

StudentId (Auto PK)  StudentForename   StudentSurname
1                    Joe               Price
2                    Kyle              May
3                    Mark              Knowles

Student_Answer Table:

StudentAnswerId (auto PK) SessionId(FK) QuestionId (FK) StudentAnswer  StudentId (FK)
1                         1             1               C              1
2                         1             1               B              1
3                         1             1               A              2
4                         1             1               C              2
5                         1             2               C              1
6                         1             2               B              2
7                         2             3               A              1
8                         2             3               C              2
  • 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-18T02:50:09+00:00Added an answer on June 18, 2026 at 2:50 am

    Not only do you not need the SessionID field in the StudentAnswer table, you don’t need the StudentAnswerId field either. All you need are the QuestionID, StudentId, and StudentAnswer. Your primary key would be the QuestionId and StudentId.

    This is called a many to many relationship.

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

Sidebar

Related Questions

This is not an issue with a few tables, but when I have a
I have five tables that are fairly similar in structure but different enough that
This should be so simple, but I'm drawing a blank. I have two tables.
I have a SQL statement that joins 5 tables but I think I must
I have two tables (Releases and Formats) and a field that is linked to
I'm having an issue with MySQL . I have 2 Tables : Table A
I'm using Filemaker Pro 12 Advanced. I have a few tables but have really
I am trying to empty the tables but I was wondering have I got
I have many tables with identical schemas but different names. Can I create a
I have three tables (lots in reality but these three are the ones I

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.