0

Our application should keep several accounts logged at the same time. All accounts use very similar data structure. However, the data they use differs.

Currently, when user switches from one account to another we are purging the db and synchronizing it for the current account. But it takes 2-3 seconds to fetch everything from server.

What we are trying is to create different schema for each login and switch among them. (I am not sure if it is possible, since I couldn't find any related question and the documentation also keeps silence). That would save the users' nerves who actively use several accounts.

Is it possible to implement data access with several schemas using Room Persistence Library?

Yeti
  • 1,108
  • 19
  • 28
valijon
  • 1,304
  • 2
  • 20
  • 35
  • 1
    Don't know if you can create different schema for each user, but you can create a different DB for each user and switch the entire DB. – Ohmnibus May 07 '18 at 13:07
  • A single table can only have one schema. Why don't you create different tables for different schemas? – Yash May 07 '18 at 17:53
  • Maybe the first answer here can be of help to you: https://stackoverflow.com/questions/40542762/multiple-realm-tables-of-same-class – Mohammed Mukhtar Feb 03 '19 at 04:02

0 Answers0