0

newbie in Ionic and PouchDB. I saw this thread PouchDB structure and I wonder if to make a collection or table-like in PouchDB, I should always add a column for something like "type"?

Because I wanted to do a simple todo list with User/Owner of that todo.

If I do this in SQL db, I would have table for users and table for tasks with user_id.

thanks!

Community
  • 1
  • 1
dr.calix
  • 667
  • 8
  • 21

1 Answers1

3

you can go for per user per database approach to store to do list for each user. you can create separate database for each user and store to-do list of that particular user in that database.

You can store each to-do task as separate document in database, we can consider it as a record or row in any SQL db.

per user database is best approach here rather then storing all user's to-do lists in single database.

Bhavesh Jariwala
  • 885
  • 8
  • 27