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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:09:29+00:00 2026-06-17T09:09:29+00:00

I am busy practicing on designing a simple todo list webapp whereby a user

  • 0

I am busy practicing on designing a simple todo list webapp whereby a user can authenticate into the app and save todo list items. The user is also only able to to view/edit the todo list items that they added.

This seems to be a general feature (authenticated user only views their own data) in most web applications (or applications in general).

To me what is important is having knowledge of the different options for accomplishing this. What I would like to achieve is a solution that can handle lots of users’ data effectively. At the moment I am doing this using a Relational Database, but noSQL answers would be useful to me as well.

The following ideas came to mind:

  • Add a user_id column each time this “feature” is needed.
  • Add an association table (in the example above a user_todo_list_item table) that associates the data.
  • Design in such a way that you have a table per user per “feature” … so you would have a todolist_userABC table. It’s an option but I do not like it much since a thousand user’s means a thousand tables?!
  • Add row level security to the specific “feature”. I am not familiar on how this works but it seems to be a valid option. I am also not sure whether this is database vendor specific.

    Of my choices I went with the user_id column on the todolist_item table. Although it can do the job, I feel that a user_id column might be problematic when reading data if the data within the table gets large enough. One could add an index I guess but I am not sure of the index’s effectiveness.

    What I don’t like about it is that I need to have a user_id for every table where I desire this type of feature which doesn’t seem correct to me? It also seems that when I implement the database layer I would have to add this to my queries for every feature (unless I use some AOP)?

    I had a look around (How does Trello store data in MongoDB? (Collection per board?)), but it does not speak about the techniques regarding user_id columns or things like that. I also tried reading about this in some security frameworks (Spring Security to be specific) but it seems that it only goes into privileges/permissions on a table level and not a row level?

    So the question is whether my choice was appropriate and if there are better techniques to do 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-06-17T09:09:29+00:00Added an answer on June 17, 2026 at 9:09 am

      Your choice is the natural thing to do.

      The table-per-user is a non-starter (anything that modifies the database structure in response to user action is usually suspect).

      Row-level security isn’t really an option for webapps – it requires each user session to have a separate, persistent connection to the database, which is rarely practical. And yes, it is vendor-specific.

      How you index your tables depends entirely on your usage patterns and types of queries you want to run. Is ‘show all TODOs for a user’ a query you want to support (seems like it would be)? Then and index on the user id is obviously needed.

      Why does having a user_id column seem wrong to you? If you want to restrict access by user, you need to be able to identify which user the record belongs to. Doesn’t actually mean that every table needs it – for example, if one record composes another (say, your TODOs have ‘steps’, each step belongs to a single TODO), only the root of the object graph needs the user id.

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

    Sidebar

    Related Questions

    Im busy with my app and i walked in some problems when i click
    I'm busy on a little jquery mobile webapp with a couple buttons and a
    I'm very busy write now debugging some code, so I can't cookup a complete
    I've been busy working on a program that can solve Minesweeper puzzles (for no
    Im busy with a Windows Embedded CE 5.0 mobile app. I'm a bit stuck
    I'm busy with a simple application. It reads xml and puts the information in
    I am busy making some optimizations to a app of mine, what is the
    I'm busy developing an application where users can search within multiple table, now I'm
    I'm busy creating a very simplistic ruby on rails app that won't need a
    I’m busy making a customized table view app and was wondering if it will

    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.