0

I am using sqlite3 for python to build a notes management application using tkinter. I wanted to know how can I create a separate table to handle each user's data (contains id, tags and memo for each note) separately. Is it possible to create separate table for each user in database?

rgvlee
  • 2,773
  • 1
  • 13
  • 20
  • 1
    Maintaining a separate _table_ for each user is a bad idea. Instead, just use a single table with a column for the user ID. – Tim Biegeleisen Apr 26 '20 at 04:52
  • each user can have multiple notes and hence can access them if he/she has seperate table – Yashodeep D Apr 26 '20 at 04:52
  • "each user can have multiple notes and hence can access them if he/she has seperate table" - what does having multiple notes have to do with having separate tables for each user? Just add a `UserId` column to your `Notes` table and make it a component column of the table's Composite Primary Key (for referentially-secure foreign keys). – Dai Apr 26 '20 at 05:05
  • ok will try thanks @Dai – Yashodeep D Apr 26 '20 at 05:08

0 Answers0