Lecture
One of the most important decisions a developer makes is
which database to use. For many years,
the options were limited to various relational databases that
supported the Structured Query Language (SQL). These
include MS SQL Server, Oracle, MySQL, PostgreSQL, DB2, and
many others.
Over the past 15 years, many new databases have appeared on the market
following the NoSQL approach. These include key-value
stores such as Redis and Amazon DynamoDB, wide-column
databases such as Cassandra and HBase, document stores such as
MongoDB and Couchbase, as well as graph databases and search
engines such as Elasticsearch and Solr.
Redis is an open-source, in-memory NoSQL key-value database management system. It was created by the Italian developer Salvatore Sanfilippo to solve a typical, classic problem — caching queries during database lookups.
The first version was written in Tcl and contained just 319 lines of code. It was then rewritten in C and presented on The Hacker News in 2009. Today the system supports various programming languages, including C#, Java, Go, Python, and Node.js.
Originally the project was released under the BSD license, but in 2024 it switched to a dual license — RSALv2+SSPLv1, because the folks behind it also want to make some money)
By the way, the name of the system has nothing to do with the juicy, crunchy root vegetable: in this case the word «Redis» is an acronym for REmote DIctionary Server.
One of the most popular SQL database management systems
is the open-source MySQL. It is implemented primarily
as a relational database management system (RDBMS) for software
applications based on web technologies.
Here is what a simple SQL database table looks like:
id name birthday last visit clothing favorite ice- adopted
size cream
1 Jimmy 09-22-1992 09-01-2019 S Mint chocolate false
2 Jessica 07-21-1992 02-22-2018 M Rocky road true
There are many NoSQL ("not only SQL") databases.
NoSQL databases model data in ways that exclude the
table relationships used in relational
databases. These databases became popular in the early 2000s
among companies that needed cloud-based database clustering
because of their clear scaling requirements (for example, Facebook). In
such applications, data consistency was far less important
than performance and scalability.
In the beginning, NoSQL databases were often used for
niche data management tasks. Mainly, when it
came to web and cloud applications, NoSQL databases processed
and distributed impressive volumes of data. Working engineers
also liked the flexible data schema of NoSQL (or its complete
absence), so that rapid changes were possible in applications
being updated.
Key features of NoSQL:
To better understand NoSQL, let's look at an example.
Imagine that we need to store some specific information about relatives
in a notebook. Then the cover of the notebook would have the word
"Relatives" written in large letters, and the first page would contain data about the first
relative:

And, for example, on the second page:

Then each page of the notebook stores information about
each relative, and to get this information you simply need to
open the notebook to that page.
Comments