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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:25:44+00:00 2026-05-15T22:25:44+00:00

I’m designing a new DataBase that at the moment has 50 Tables. For many

  • 0

I’m designing a new DataBase that at the moment has 50 Tables. For many of that tables I have to eventually store a “note” for every column of every tuple.
For now I found only 2 solutions:

  1. For each column of tables that needs note add a “column note” so for example:

    create table tab (id integer, A varchar(100), B varchar(200))
    

    will become:

    create table tab (id integer, A varchar(100), A_note varchar(300), B varchar(200), B_note varchar(300))
    
  2. Add a table Note that store the notes… like that:

    create table notes (id integer, table_name varchar(100), reference_id integer, reference_column varchar(100), note varchar(300)
    

Do you can suggest me other ways?
If you are interested I’m using HsqlDB.

  • 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-15T22:25:44+00:00Added an answer on May 15, 2026 at 10:25 pm

    It depends a lot on how sparse your notes are, if they are scattered occasionally across all the tables then a good solution is to have one table containing notes that indexes them by the combination of table and field name.

    This moves the addition of notes to the schema out to just one table that needs maintaining without having to touch the originals. You can use a constraint on the table and fieldname columns to restrict which ones can have notes.

    I have implemented a variation on that very successfully to add typed tags to a large accounting system.

    If a single table is distasteful, consider applying the pattern to clusters of tables.

    One big advantage of the single Notes table is that you have one table to search if people are looking by note content. This can be very useful when people put notes in the wrong place.

    Extension

    I read the requirement as being one Note per Column.

    In the case where an optional Note (or Tag) is to be stored occasionally for odd individual row values in columns (ie: the Excel model of attaching comments) then you extend my model above by adding a regular integer key for your rows. That is actually the model I first used. I simplified it for the answer but then realised maybe the requirements were misleading.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I have a reasonable size flat file database of text documents mostly saved in
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't

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.