Introduction to Databases
We've dealt with JSON. Now we pass to the main thing, to databases. Data can be stored in them in a variety of ways. At the same time, it has historically developed so that the relational database model has received the greatest distribution.
When using the relational model, data is stored in the form of tables, with a specific set of data, whose structure is rigidly specified at the database design stage. The description of a data structure in relational databases is called a schema. It defines the composition of the tables, the structure of the fields in these tables, as well as the relationships between them.
The DBMS (DataBase Management System) uses the SQL language to manage data with a relational model.
SQL - Structured Query Language. This is a declarative language, which means that its commands describe only the necessary action (find data, delete them, change), and each DBMS decides for itself how to perform it.
There are many different relational DBMSs. Among the most common are Oracle, MySQL, MS SQL, PostgreSQL. By the way, AppMaster uses PostgreSQL, which means that it uses a modern advanced DBMS that works in a huge number of different organizations and is also free software (that is, you don’t need to pay extra money for using it).
Have you noticed the presence of the SQL abbreviation in almost every DBMS name? Actually, an alternative name for a relational database is an SQL database.
However, there is an alternative approach. Non-relational databases, or NoSQL. It is worth noting that No in this case is not a negation of “no”, but an abbreviation for Not only. That is, “Not only SQL”.
Non-relational DBMSs do not use a common query format (like SQL), each of them implements its own way of working with data.
They do not require a uniquely defined data storage structure. The data itself is stored in them not in the form of strict tables, but in the form of objects with an arbitrary set of attributes (much like JSON). This may be relevant when working with data whose structure is subject to frequent changes.
At the same time, due to its free structure, NoSQL solutions are easier to scale if you need to create a database distributed on multiple servers.
Examples of NoSQL DBMS include MongoDB and Redis.