windchime
windchime

Reputation: 1285

What is the downside of using localDisk as storage means in Sails project

I am trying to decide what database to use in a Sails project. I started with localDisk and it works fine. I wonder why a database like Postgres or Mongo is needed. Could someone explain to me?

Also since waterline abstracted the underlying database, what is the difference between those underlying databases, such as Postgres, Mongo and Redis?

Upvotes: 1

Views: 294

Answers (1)

taufique
taufique

Reputation: 2751

On question# 1:

I am quoting from balderdashy about sails-disk

Functions as a persistent object store which works great as a bundled, starter database (with the strict caveat that it is for non-production use only). [Reference]

While databases like MongoDB, PostgreSQL, MySQL etc. provides you the reliability to use them in production, sails-disk tells you not to use it in production. Reason? sails-disk is not designed to handle production related issues. So, you can use sails-disk if you have very small database and performance is not an issue to you. Otherwise you can't rely on sails-disk.


On question# 2:

If you use waterline ORM then your queries would be same independent of the underlying database you use. That's the purpose of ORMs (Object Relational Mapping). But the performance of query execution would be highly dependent on the architecture of your database design, the load of queries. So you have to choose the database engine to use depending the scenario your application would handle.

Upvotes: 1

Related Questions