A
A
Alexander2020-07-01 22:40:14
Database
Alexander, 2020-07-01 22:40:14

What is the difference between a sql database and a javascript database?

Recently I came across an article about a Javascript database, after reading the question arose, what is the actual advantage of sql databases over js databases? And, if js databases exist, what's the point of using sql? Tell me about the pros and cons of both options, I will be very grateful.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Karpion, 2020-07-01
@Alexandre888

SQL is a query language for a relational database (it can also be fastened to a non-relational one, but through an aphedron). In terms of meaning - approximately like a network protocol, the 5th lvl of the OSI model (over TCP, which is on the 4th). It's like HTTP, POST and GET methods.
JS is a normal programming language in which you can write almost anything, as long as there is an execution environment in the place where the program should work. It does not enter the OSI model at all - this is from a different area. You can write in JS both a SQL client and a SQL server.
The point of using off-the-shelf DBMSs (and, therefore, using the existing interface to them) is that these DBMSs correctly implement transactions and at the same time work quickly. I'm somehow not sure that you understand the meaning of using transactions - but if you try to implement the DBMS yourself, you will understand; Here only problems will be strange and irreproducible.

L
Lynatik001, 2020-07-01
@Lynatik001

well, firstly, you can make a bike for a year, but customers will not understand, and the maximum that you get from them is what everyone gets when doing it on ready-made libraries, frameworks, engines. etc. There is such a thing as Mongodb - mongoose (or something that makes interaction easier too). faster than standard sql database.
That's just mungus is not a relational database. And this immediately catches the eye and causes its own difficulties, when creating more than just a "user" table XD
+ I advise you to read fresh articles, and not 2011 :)

V
Vladimir Korotenko, 2020-07-01
@firedragon

The article describes a very old, although similar to the modern one. It's not clear what's under the hood.
But! It filters the data already present on the page. And imagine you have them at least 100 megabytes?
And if it is finely stuffed json? and strapping for display?
In general, databases on servers operate with a fairly small amount of data to display a huge amount, and generally only a fragment is given to the client.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question