Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between a realtime database and a "normal" database?

I'm researching some backend-as-a-service (BaaS) solutions for developing web applications, and I constantly see that Firebase refers to their database as a "realtime database", while for example Backendless doesn't mention the phrase "real time" anywhere.

I understand that realtime means that the data is processed immediately, but I thought all databases did that? If I for example have a MySQL/SQLite/PostgreSQL database and insert data, I expect it to be available for retrieval within (milli)seconds later, and definitely directly after an "INSERT ..." query has been completed.

Can someone shed a light on what is so different about the Firebase realtime database, compared to other BaaS services "normal" databases?

like image 931
Magnus Avatar asked Apr 15 '17 09:04

Magnus


2 Answers

Term real time is little confusing but indeed Firebase is very different from normal databases. There are two main differences. First is the way it stores data and another is the way we access it. In normal database when data at back end get updated we need to refresh our browser or android app in order to get updated data, on other hand in firebase we don't even need to refresh the page. Changes done from any other client browser will reflected to all connected clients without making any server side call.

like image 104
Santosh Kadam Avatar answered Oct 20 '22 03:10

Santosh Kadam


It is seldom related to how people coin the name, "real time" or if it is offered as BaaS. If data can be retrieved much faster by optimising storage and retrieval, then it can be classified as real-time. E.g. of real time database Aerospike, SAP Hana, Volt DB, memcached, redis and SQLite.

Realtime or in-memory Database,

  1. Data stored in RAM. For reliability, data is backup on non-volatile memory. nvram might be used in future.
  2. Cost is higher.
  3. High Performance.
  4. No serialisation is required. As data is accessed using pointers.
  5. Uses AVL tree(or other optimal data structure) for indexing to support range queries.

RDBMS "normal" Database,

  1. Data stored in Hard Disk or SSD.
  2. Low cost.
  3. Durable.
  4. Need to serialise as data is stored in file.
  5. Uses BTree for indexing.
like image 35
Bharathkumar V Avatar answered Oct 20 '22 01:10

Bharathkumar V