1

I'm developing a cross-platform app using Xamarin. Now, for data storage I'm using both Online (through API) and offline(SQLite). The app I want to develop has dynamic UI and the UI configuration is stored in DB1, while the actual data stored in another database DB2.

Now, the issue I'm facing is that I have some views created in DB1 which fetches data from DB2 as well(i.e., VIEW acroSs multiple database) and I use that VIEW to create the UI with Data from the DB1.

I did some research and found that SQLite doesn't support the VIEW across multiple database.

Can anyone help me with some workaround that can fulfill my purpose? Also, I'm open to change the DB from SQLite to any other light-weight cross-platform-oriented database.

Thanks

4
  • You can create temp views across multiple Sqlite dbs at runtime ( create temp view .....) : sqlite.org/lang_createview.html Commented Aug 31, 2020 at 3:59
  • stackoverflow.com/questions/10410180/… Commented Aug 31, 2020 at 4:05
  • Thanks @SushiHangover But is there any way I can do this without temp view ? Also, I actually want to retain that view, would it be possible with the Temporary view ? Becuase I read that the temporary view are created in the temp database which exists only for that process. Commented Aug 31, 2020 at 4:35
  • No, Sqlite only supports "temp views" across attached databases. Unless you are talking huge database files (and on mobile you should not be), temp view creation speed should not be an issue, but with simple test you can determine if it is a runtime/computational/filesystem speed issue. Of course, for your mobile design, you can always merge those two DBs into one and not have to deal with runtime created views. Commented Aug 31, 2020 at 5:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.