SQLitePCL vs. Akavache
Join the DZone community and get the full member experience.Join For Free
Earlier this week I shared the news that there is now an "official(ish)" version of SQLite that can be used in what Microsoft calls "Universal Apps".
SQLitePCL Now Supports Universal Windows Apps! http://t.co/X31x3Zjw1t— Windows Phone UG (@wpug) June 30, 2014
I was asked how this compares with using Akavache and if I have any recommendations?
If you're not familiar Akavache it's "an asynchronous, persistent key-value store for native applications". In that it can use SQLite as its data store and that both can be used in Windows and Windows Phone apps then the comparison question becomes even more relevant.
That's to risk potential confusion though. The underlying data source isn't really relevant. What matters is what their purpose is and what they're capable of.
The first big difference between the two options is in the type of data they can store. SQLite allows the storing of relational data. (It is a relational database after all.) Akavache can just store key-value pairs.
Of course you could just store key-value data in SQLite yourself. So why use Akavache?
The answer lies in what it adds beyond just being a key-value store. It is designed for working with (and storing) remote data that may be cached. Whether that's HTTP response, images or JSON data. Akavache adds more than just a key value store it provides smart logic for retrieving and caching remote resources.
So, my recommendation is that if you only need to store remotely sourced key-value pairs then use Akavache. If you need to store relational data then use SQLite.
Published at DZone with permission of Matt Lacey, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.