본문 바로가기

Flutter-플러터/플러터 공부

Flutter 데이터 베이스 선택? Sqllite, hive, getstorage

반응형

결론  : 간단한 테스트용은 getstorage 

정식 출시는 hive 하지만 더 큰 데이터를 다루기 위해서는 sqllite 선택!

 

 

GetStorage and Hive are both key-value storage solutions for Flutter. They both allow you to store data locally on the device, but they have different strengths and weaknesses.

GetStorage is a lightweight solution that is easy to use. It is a good choice for storing small amounts of data, such as user preferences or session state. GetStorage is also good for prototyping or testing applications.

Hive is a more powerful solution that can store larger amounts of data. It is a good choice for storing data that needs to be persisted across app sessions, such as user data or game progress. Hive is also good for applications that need to access data from multiple threads.

Here is a table that summarizes the differences between GetStorage and Hive:

 

 

SQLite is a relational database management system (RDBMS) contained in a C programming library. The sqlite library is self-contained, meaning there are no external dependencies. SQLite is a popular choice for embedded systems and mobile applications because it is small, fast, and easy to use.

SQLite is a good choice for storing large amounts of data. It is also a good choice for applications that need to access data from multiple threads. SQLite is a relational database, which means that data is stored in tables. Tables are made up of rows and columns. Each row represents a record, and each column represents a field.

SQLite is a powerful database, but it can be more complex to use than GetStorage or Hive. If you are not familiar with relational databases, it may be a good idea to start with GetStorage or Hive.

Here is a table that summarizes the differences between SQLite, GetStorage, and Hive:

FeatureSQLiteGetStorageHive
Ease of use More complex to use Easy to use More complex to use
Data size Large amounts of data Small amounts of data Large amounts of data
Persistence Data is persisted across app sessions Data is not persisted across app sessions Data is persisted across app sessions
Multithreading Thread-safe Not thread-safe Thread-safe

Ultimately, the best choice for you will depend on your specific needs. If you are looking for a powerful database that can store large amounts of data, SQLite is a good choice. If you are looking for a lightweight solution that is easy to use, GetStorage is a good choice. If you need to store data that needs to be persisted across app sessions, Hive is a better choice.

반응형