0

question = require("comments");
// which one is better ?
DATABASES ? SQL : NoSQL;
exit;

Comments
  • 2
    SQL is relational data
    NoSQL is generally blobs of data.

    Both are useful depending on the data you are storing and how you plan to use it.
  • 0
    @C0D4 so lets suppose i'm migrating from sql to nosql. what is the replacement of sql table relations in a nosql database
  • 1
    @moolsbytheway depends on what you are doing. Like rather than relating two tables via a foreign key, you make relationships hierarchical.

    So if you have a model say user that can have posts.

    Then you would nest the posts in the user schema as oppose to assigning a user_id to them.
  • 0
    NoSQL, way cleaner.
  • 1
    @moolsbytheway don't. Use nosql when using relational is not needed. They both have use cases.
  • 0
    @asosnovsky ok lets say. i have a field location cant i just give the location_id and then access the location data from Location document ?
  • 0
    @iam13islucky "nosql is way faster and scalable", they say.
  • 1
    @moolsbytheway meh. Good indexes, caching, and generally paying attention to what is slowing it down works wonders. "Scalable" is a buzzword to kill all buzzwords.
  • 0
    Also, mongoDB's own website says it isn't for everything. Sometimes a mix of the two is best.
  • 0
    @moolsbytheway depending on the implementation of the db (nosql does not just mean document databases like mongodb). Generally thats not how document databases work.
  • 0
    mongodb ? i'm trying it with node js.
  • 0
    @wolt of course. and masssssive web apps tunning with php. but i'm trying the javascript way of doing that. us there sql for Node ?
Add Comment