15 Matching Annotations
  1. Jul 2019
    1. Firebase Vs MongoDB : Battle of the Best Databases 2019You are here:HomeDev & DesignFirebase Vs MongoDB : Battle…

      Now that you may have found that NoSQL database is the best option for you to set up your servers, you must find the best NoSQL database. Likewise, there are two prominent candidates for you to choose from Firebase Vs MongoDB.

  2. Jun 2019
  3. Oct 2018
  4. Jul 2018
    1. In production environment, each shard is a separate replica set

      this (probably) means that each such 'Shard' server is actually multiple servers, in a replica set

    1. client application always interact with the primary node

      Is it always like this? If so, this ensures only high-availability, but not scaling by LB or the like

    1. Optional. Builds the index in the background so the operation does not block other database activities. Specify true to build in the background. The default value is false.

      I don't get it - what's the point of not having this set to true by default? Would anyone like to block his DB?...

    1. _id is 12 bytes hexadecimal number unique for every document in a collection. 12 bytes are divided as follows − _id: ObjectId(4 bytes timestamp, 3 bytes machine id, 2 bytes process id, 3 bytes incrementer)

      The specifications of the 'ID' of a document in MongoDB - important!

  5. Jun 2018
    1. Duplicate the data (but limited) because disk space is cheap as compare to compute time.

      now that differs from RDBMs

    2. Combine objects into one document if you will use them together. Otherwise separate them (but make sure there should not be need of joins).

      Important consideration, similar to normalization done in RDBMs, when designing collections/schema

    1. These 12 bytes first 4 bytes for the current timestamp, next 3 bytes for machine id, next 2 bytes for process id of MongoDB server and remaining 3 bytes are simple incremental VALUE.

      mongo DB document _id is comprised of 12 hexadecimal characters, and this is the break down of its meaning

    1. We've decided not to have a model for the BookInstance:status — we will hard code the acceptable values because we don't expect these to change

      the consideration here not to have this as a model is the unlikelihood that the values will change over time

  6. Aug 2017
  7. Dec 2016
    1. When you’re picking a data store, the most important thing to understand is where in your data — and where in its connections — the business value lies. If you don’t know yet, which is perfectly reasonable, then choose something that won’t paint you into a corner. Pushing arbitrary JSON into your database sounds flexible, but true flexibility is easily adding the features your business needs.

      This is an old article but valuable thinking for system design.

    1. The BSON format used by MongoDB is limited to a maximum of 64 bits for representing an integer or floating point number, whereas the JSONB format used by Postgres does not have this limit. Postgres provides data constraint and validation functions to help ensure that JSON documents are more meaningful: for example, preventing attempts to store alphabetical characters where numerical values are expected. MongoDB offers automatic database sharding for easy horizontal scaling of JSON data storage. Scaling of Postgres installations has often been vertical. Horizontal scaling of Postgres is also possible, but tends to be more involved or use an additional third party solution. MongoDB also offers the possibility of increasing write throughput by deferring writing to disk. The tradeoff is potential loss of data, but this may suit users who have less need to persist their data.

      Good pros and cons of Mongo vs Postgres for JsonB