简体   繁体   中英

Local database choice (Windows Phone 8.1 application)

I am in the process of making a relatively complex Windows Phone 8.1 application and I need a way to store data from server's database into a local database. Data from server is retrieved in JSON format via API. What are my options here? I've tried SQLite database controlled by sqlite-net but it lacks key features such as foreign keys support and 64bit support (?). What other choices do I have? Local database is used in order to give the user ability to work offline and later sync the data from local database with server's database.

I suggest Portable Class Library for SQLite by Microsoft Open Technologies, Inc. You can install it to your project by visual studio NuGet Package Manager.

Using SQLitePCL is very easy. This library truly mimics the C/C++ interface of SQLite. You can find the details of the interfaces here: https://www.sqlite.org/cintro.html

How many choices? Not many. Local databases for Windows Store apps is a sensitive topic.

You can use foreign keys in sqlite-net if you use the extensions: https://bitbucket.org/twincoders/sqlite-net-extensions

There is also Lex.DB which supports concurrent R/W and also has a very clean and easy to handle API: http://lexblog.azurewebsites.net/intro-to-lex-db/

I don't really see the benefit of x64 support for a Windows Phone application - especially since these devices have an ARM architecture.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM