sqlite - How to handle multi-user data storage in Android?
大家讲道理
大家讲道理 2017-05-16 13:33:38
0
5
2645

The current implementation is that one User corresponds to one database. But I think it is also possible to add a User table and use foreign key association. Don't know which implementation is better? Are there any other ways to achieve this?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(5)
Ty80

From the perspective of easy upgrade, it is better to use 一个数据库+外键关联, especially when using a third-party ORM.

漂亮男人

Same as the website backend, use User+foreign keys, as mentioned above, if you upgrade the table structure one by one, you will be exhausted.

伊谢尔伦

One User corresponds to one database, and data search is fast

習慣沉默

What effect do you want to achieve?
Or what data is stored?

PHPzhong

You can create tables by user (table name + user ID)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template