Is it possible to have a SQL database in React Native? Is it possible to have a SQL database in React Native? sqlite sqlite

Is it possible to have a SQL database in React Native?


If you search around web, you will find developers are using these major databases for React Native. Such as:

1. Realm2. Firebase3. SQLite4. Core Data5. PouchDB6. Async Storage(not a full scale database, but still quite popular)

But, which Database is right for your React Native Application?To make the unbiased comparison, we are taking many development factors, and application features into consideration.

For Instance:

Offline-first

Does it supports offline feature in the app? How does it handle synchronisations and conflict across multiple devices?

Database security

Does it supports AES 256 level of encryption and decryption? Would I be able to implement a secure authentication?

App performance

To evaluate the performance, we took many factors like read/write speed, zero copy design, storage engine, and how does it handle concurrency control?

Industry regulations

Large organisations have to adhere to industry regulations and compliances in order to deploy their application securely. Learn which databases comply with regulations, and which don't.

Supported file and data types

We explored the data types(Bool, Int, Int8, Int16, Int32, Int64), and file types(images, videos), which are supported by these databases.

Pricing

Some databases are open source and free to use like SQLite, and PouchDB. But, databases like Realm, and Firebase charge for their additional features. Find out how database pricing stacks up to your needs.

Real time sync

For Streaming, and gaming applications, Real Time Sync is crucial. Learn which database is more suitable when you need to sync the data in real time.


Probably you can use a library like this https://github.com/andpor/react-native-sqlite-storage

Using SQLite in both Android or iOS natively is pretty straightforward, anyway you need some interface in react native to handle the DB, this library would solve both issues for you.


If you want SQLite DB only for React NativeUse this

Second thing

Realm is not SQLite DB. It's Built from the ground up.

So, If it's fine to have the different database then SQLite.You can start with Realm here