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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:42:08+00:00 2026-05-13T11:42:08+00:00

I have a SQLite database of notes that have columns _id, title, details, listid

  • 0

I have a SQLite database of notes that have columns _id, title, details, listid

_id is the auto incremented primary key
title and details are string data fields
listid is a foreign key pointing to a list name in another table.

I’d like to find a way to have notes that are in multiple lists or notes that are linked in such a way that updating one will update the other or be edited simultaneously by some other means.

The overall goal is to have copies of the same note in multiple lists where you edit one and the rest update automatically.

I’ve thought of adding an extra column with a sort of link id that will be shared by all linked notes, creating a way to update other notes.

  • 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-13T11:42:08+00:00Added an answer on May 13, 2026 at 11:42 am

    Have three tables:

    NOTE: _id, title, details
    
    LIST: _id, listname
    
    NOTES_IN_LIST: note_id, list_id
    

    Then whenever you add a note to a list, you add a new row to NOTES_IN_LIST that connects that note (‘s note_id) to the list (‘s list_id).

    Whenever you edit a note, you just edit it in the NOTE table.

    Whenever you list the contents of the list that you have the id for, you do a SELECT something like:

    SELECT title, details
    from NOTE
    where NOTE._id in (
        SELECT note_id from NOTES_IN_LIST
        where list_id=<your list id>
    )
    

    or

    SELECT title, details
    from NOTE, NOTES_IN_LIST
    where
        NOTE._id=NOTES_IN_LIST.note_id
        and
        NOTES_IN_LIST.list_id=<your list id>
    

    Hmm, to transfer old notes to new structure, I would:

    • create a new notes table with a new autoincrement id field
    • then select distinct (note title, note details) into that new notes table
    • then join the old notes table to the new notes table on old_title=new_title and old_detail=new_detail, then select from that the new note id and the old list id, then insert the resulting table into the NOTES_IN_LIST table
    • then I think you can delete the old notes table

    Make sure noone edits or adds notes while this is happening, or you will lose notes.

    Also you will need to update the UI to work into the new notes table, put notes to lists not by copying but by inserting a new row into NOTES_IN_LIST, etc.

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

Sidebar

Related Questions

No related questions found

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.