How can we sell at such a low price?

We are a full service Camcorder battery distributor offering wholesale prices to our customers.Our Leica BP-DC13 Camcorder battery have been tested and validated on Leica systems to ensure it will…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Why I preffer Hive For Local Storage

Hive is a lightweight and fast key-value local db written in pure Dart.

Sql databases are a popular database that almost everyone learns in the software learning process. Just because it’s popular doesn’t mean it’s always preferable. It will be much better to prefer a nosql database, especially in small-scale local database applications that we will develop.

Let’s look at the performance comparison of sqlite vs hive.

Yes hive is very fast when compared to sqlite. But the strength of sqlite is in its ability to make queries. If you need to combine data from different tables, you should prefer sqlite. If the data you want to query will be taken from more than one table, you should still prefer sqlite.

You can keep data with key-value pair with Hive. You can read and write your data quickly.

Let’s take a look at Hive and its key features for those who don’t know.

Hive is an advanced NoSQL local database.

All data stored in Hive is organized in boxes. A box can be compared to a table in SQL, but it does not have a structure and can contain anything.

Boxes can also be encrypted to store sensitive data.

Add the following to your pubspec.yaml:

init Hive before runApp() in main.dart

You need to open your box first.

Just overwrite the value to same key.

That’s all for this article.

Add a comment

Related posts:

Why Should Businesses Track their Social Impact?

When I started working on a project supporting impact-driven businesses in the Philippines, one of the many things I realized is that it is quite challenging to prove how these businesses can create…