jeudi 14 janvier 2016

Multi user database

I developp an application with potential multi users. My data is stored in a database with the content provider. I searched the best way to create the database. Actually, I have 3 ideas :

  1. Single database - Add UserId column in each table
  2. Single database - Remove all data at disconnection, so the next user will have a new empty database
  3. Multi database - One database for each user (for exemple with the name {userId}-mydatabase.db)

Can someone know the best way to do this?
For information, data is not shared between users.

Aucun commentaire:

Enregistrer un commentaire