6
8 Comments

No SQL or SQL databases

I have been doing some research around to decide on the pros and cons of no SQL and SQL databases.

I am building an application mainly for practice to help me learn react.js and express.js and node.js the application what I am building is an online card system where you can have farewell cards and birth cards all done online that is basically what the app nothing to fancy as this is my third project

If anyone has any insights on the pros and cons of these databases that maybe might be missed on a google search

on September 30, 2021
  1. 5

    (almost) Always go SQL.

  2. 3

    I recommend using a database that supports both relational and non-relational data like Postgres with JSONB columns. Using an RDBMS works very well for the use case you've described where you know and control the schema of your data. In either case, you still need to deal with the structural integrity of your data. With NoSQL you're just moving that from a well-established database level to the application level.

  3. 2

    I would _strongly _recommend using relational SQL, it's more applicable to more business use cases. Better for you to learn first.

  4. 2

    For your use case I'd probably recommend using Postgres and going the SQL route. Your dataset seems pretty well defined.

    The NoSQL route is better for use cases where: there are a lot of unknowns about the data that you are working with (e.g. using a JSON document store), and/or you need to optimize to be more write heavy and are less worried about overall DB structure

  5. 2

    I think it all depends on the application, how it consumes the data and user scalability. Coming from a SQL background myself I would nearly always use an SQL DB but sometimes ( mainly to have a play around ) I have used a NoSQL DB.

    Used Azure Cosmos for NoSQL DB and if you are inserting and reading data it's lightning. If you need complex joining data it's a nightmare.

  6. 2

    I don't have experience with NoSQL databases, but in my understanding such db would be good if you don't have documents with complex relations. Your description suggests that probably NoSQL would be OK for you (MongoDB).

    Usually I work with PostgreSQL or MS SQL, because I'm working with CRM-like applications, so many records have relations with others. Such things are hard to make in NoSQL.

    @aerovulpe already said one thing - some relational databases in recent years have been improved with new columns types, which holds JSON type. You can check it on PostgreSQL and MS SQL.

    1. 2

      I have used MongoDB a lot (coming from the Meteor.js world). I think it's definitely possible to mimic the relational logic with NoSQL databases. However, the read operations can be quite inefficient in comparison with RDBMS.

  7. 1

    Use what you are comfortable with. In the long run, doesn't matter much.