Im trying to make a restaurant POS app using flutter.
I have "Order" entity that will get large overtime and i need to be able to search for orders on exact date
Question:
-can i use hive to store "Order" and achieve what i want without worrying about memory/performance problems?
-what will be the right key for the Orders box?
-what is the better alternative to Hive for such cases?
I googled Hive db, its simple and exactly what i need for the most part of the app but still i cant find answer to my question. i found out about lazy box but that still loads every key into the memory and i dont know if thats a problem so i need some guidance
2
Answers
Hive and ObjectBox are the best in term of performance and they support all types of variables like (List,Map,String,double,int,etc…) . unlike Sqflite is a bit slow and hard to use because it doesn’t support all the variables types and the queries are annoying . I suggest that you use Hive .
Hive is a lightweight and blazing fast key-value database written in pure Dart.
Features:
🚀 Cross platform: mobile, desktop, browser
⚡ Great performance (see benchmark)
❤️ Simple, powerful, & intuitive API
🔒 Strong encryption built in
🎈 NO native dependencies
🔋 Batteries included
1000 read iterations:
1000 write iterations: