MongoDB - NoSQL Introduction
A NoSQL database is simply a database that does not use SQL. SQL was designed to be a query language for relational databases, and relational databases are usually table- based.
Difference between relational (SQL) and NoSQL database
In a relational database,
records are stored in rows and then the columns represent fields in each
row. Then SQL allows you to query within and between tables in that relational
database.
NoSQL databases are more
flexible. Many NoSQL databases allow you to define fields as you create a record.
Nested values are common in NoSQL databases. You can have hashes and arrays and
objects, and then nest more objects and arrays and hashes within
those. And then that way you can have nested values in your NoSQL database
records. Also fields are not standardized between records in NoSQL
databases. You can have a different structure for every record in your NoSQL
database.
NoSQL databases offer
flexibility that's unavailable through relational databases. The main
characteristic separating NoSQL databases from relational SQL databases is that
they do not use query languages derived from SQL.
Additionally, many NoSQL
databases are flexible in ways that relational databases are not. In the
next few videos, we'll take a look at the different types of NoSQL
databases and what they offer.
NoSQL Usage:
While NoSQL is being promoted
as a recent phenomenon, NoSQL is not new. The Apollo space program used a
NoSQL database to catalog the inventory for the parts of the space
shuttle. Many embedded devices also use NoSQL databases, and many of the early
mainframe computers use NoSQL databases as well. Just like relational
databases, NoSQL databases have trade-offs and limitations.
NoSQL databases will not solve
your website scalability issues. You have to weigh the benefits and
drawbacks of each database and see if they fit your application
needs.