Reputation: 41
What is a best practice to manage different user accounts in one application? I saw the same topics here but i didn't find answer on my question. Is it a best practice to use different "userId-appName.db" for each user in application?
Or need to add userId in each table?
Upvotes: 0
Views: 79
Reputation: 7196
No it is not a best practice to use separate databases for each user in the application. Use a table with all the users in your application and pass the userId elsewhere. It will eliminate a lot of head ache down the road. and you don't have to track every user's database. Imagine if your app have 10 users in a mobile. How will you track each user's database? another database with all those details?
Upvotes: 1