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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:14:45+00:00 2026-05-13T08:14:45+00:00

For example, I have a table that stores classes, and a table that stores

  • 0

For example, I have a table that stores classes, and a table that stores class_attributes. class_attributes has a class_attribute_id and a class_id, while classes has a class_id.

I’d guess if a dataset is “a solely child of” or “belongs solely to” or “is solely owned by”, then I need a FK to identify the parent. Without class_id in the class_attributes table I could never find out to which class this attribute belongs to.

Maybe there’s an helpful answer matrix for this?

  • 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-05-13T08:14:46+00:00Added an answer on May 13, 2026 at 8:14 am

    Wikipedia is helpful.

    In the context of relational
    databases, a foreign key is a
    referential constraint between two
    tables.1 The foreign key identifies
    a column or a set of columns in one
    (referencing) table that refers to a
    column or set of columns in another
    (referenced) table. The columns in the
    referencing table must be the primary
    key or other candidate key in the
    referenced table.

    (and it goes on into more and more detail)

    If you want to enforce the constraint that each row in class_attributes applies to exactly one row of classes, you need a foreign key. If you don’t care about enforcing this (ie, you’re fine to have attributes for non-existent classes), you don’t need an FK.

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

Sidebar

Related Questions

I have a table called Classes which stores information on College classes. It has
I have a table that stores product price information. It has a column for
I have a single table that houses student scores by their classes. For example,
I have a table that stores articles, like the example: Article table: ID #CategoryID
I have a table that contains common entries in two columns. For Example: Column1
For example I have a dropdown box that gets a town from the table
I have created a GUI that will setup the pivot table. For example, I
I have some tables that benefit from many-to-many tables. For example the team table.
For example I have a table. With a field Idnumber. And the field has
I have a table, for example, mytable. It has several columns: col1, col2, col3.

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.