Brook Preloader

MySQL vs MongoDB

MySQL vs MongoDB

The theory

Two very different DBMSs in terms of versatility and data storage approach, let’s see together how to differentiate them and grasp the PROs and CONs of both.

Lez 1: What is MySQL, PROs and CONs.

MySQL is a relational DBMS (DataBase Management System) that has tables organized into rows (data to be stored) and columns (fields pertaining to the row field) as its main data holding structure.

GO TO CLASS

Lez 2: What is MongoDB, PROs and CONs.

MongoDB is a non-relational DBMS (DataBase Management System) that has documents instead of tables as its main containment structure. The documents used by MongoDB are stored in BSON (Binary JSON), a type of data representation in JSON format characteristic for its expansive capacity.

GO TO CLASS

Lz 3: DIFFERENCES - The representation of data.

At the level of data representation, the two DBMSs operate totally differently. MySQL prefers the tabular form while MongoDB, opting to handle data with document, has a representation traceable to JSON.

GO TO CLASS

Lz 4: DIFFERENCES - Correlation of data (embedding).

In MySQL to correlate data entered in different tables a JOIN is used, the result of which will be a single table composed of the sum of the two joined tables resulting in unnecessary fields.

GO TO CLASS

Lez 5: DIFFERENCES - CRUD

While MySQL knows the well-known Structured Query Language (SQL), MongoDB reinvents its Mongo Query Language (MQL) in such a way that it strongly resembles the JavaScript language. Here are the main CRUD (Creation, Read, Update and Delete) features of both languages.

GO TO CLASS

Lez 5: DIFFERENCES - When to use MySQL or MongoDB?

There is no real solution to when to use one the other DBMS, it has to be chosen according to each case and any PROs and CONs that are going to be developed.

GO TO CLASS