In development we need to store our information somewhere and have ways to access that information. The most common way to do this is SQL or Structured Query Language. As it’s name suggests, SQL is only a language and we need a physical database to store and access our data. Early into my development career I have been introduced to relational databases such as PostgreSQL. Relational Databases are comprised of tables and store assumptions about data being related to another piece of data. This blog will be an introduction to NoSQL databases and what they can offer.
What is a NoSQL Database?
A NoSQL database does not store information in a table. A benefit of NoSQL databases is that they scale well with large amounts of data and high user loads,
While a common misconception exists that NoSQL cannot store relational data, it is actually possible and some prefer NoSQL’s way of storing that relationship.
These databases can come in many types such as document, key-value, wide-column, and graph.
Types of NoSQL Databases
These databases store data in documents similar to JSON. Documents contain pairs of fields and values. Document databases can be a flexible, general purpose database. MongoDB is considered the best NoSQL database and it is an example of a document database.
The Key-value database is similar to the document database using keys and values. A value can only be found by referencing it’s key. These databases are good for storing large amounts of data where you only need to use a key to query the database. Redis and DynanoDB are popular examples of key-value databases.
Wide-Column databases store data in tables, rows, and dynamic columns. These are similar to relational databases besides the benefit that each row is not required to have the same columns. Cassandra and HBase are two of the most popular wide-column stores.
Graph databases store data in nodes and edges. Nodes typically store information about people, places, and things while edges store information about the relationships much like a binary tree. Use cases for this database is social networking tracking relations between users. Neo4j and JanusGraph are examples of graph databases.