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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:22:48+00:00 2026-05-27T03:22:48+00:00

I would like to create a table called NOTES. I was thinking this table

  • 0

I would like to create a table called “NOTES”. I was thinking this table would contain a “table_name” VARCHAR(100) which indicates what table put in the note, a “key” or multiple “key” columns representing the primary key values of the table that this note applies to and a “note” field VARCHAR(MAX). When other tables use this table they would supply THEIR primary key(s) and their “table_name” and get all the notes associated with the primary key(s) they supplied. The problem is that other tables might have 1, 2 or more PKs so I am looking for ideas on how I can design 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-27T03:22:49+00:00Added an answer on May 27, 2026 at 3:22 am

    What you’re suggesting sounds a little convoluted to me. I would suggest something like this.

    Notes
    ------
    Id - PK
    NoteTypeId - FK to NoteTypes.Id
    NoteContent
    
    NoteTypes
    ----------
    Id - PK
    Description - This could replace the "table_name" column you suggested
    
    SomeOtherTable
    --------------
    Id - PK
    ...
    Other Columns
    ...
    NoteId - FK to Notes.Id 
    

    This would allow you to keep your data better normalized, but still get the relationships between data that you want. Note that this assumes a 1:1 relationship between rows in your other tables and Notes. If that relationship will be many to one, you’ll need a cross table.

    Have a look at this thread about database normalization

    • What is Normalisation (or Normalization)?

    Additionally, you can check this resource to learn more about foreign keys

    • http://www.w3schools.com/sql/sql_foreignkey.asp
    • 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 horse, i would like to create a form to
i have a table called horse, i would like to create a form to
I would like to create a table to store device settings. The table has
I would like to create an HTML table with row colors changing based on
I would like to create a database backed interactive AJAX webapp which has a
I have a table called 'notes', on this table I need to track who
I have a model called Category which looks like this: class Category < ActiveRecord::Base
I would like to ask something about query using mysql I have this table
Say I have a table like so: CREATE TABLE big_table (UUID varchar(32) not null,
Let us say I have a table called animals that looks like this: 1

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.