Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Introduction to NoSQL

Saturday, December 16th, 2017 by Servage

databaseWhen working on websites and applications, there are many databases to choose from. The most common choice for websites is MySQL or MariaDB, which are essentially the same database systems. Another alternative that has gained popularity recently is NoSQL databases. Today it’s time to look at how NoSQL databases work, how they differ from MySQL and if there are any benefits in using a NoSQL database instead.

What is NoSQL?

You have likely used either MariaDB or MySQL in the past. Both of these are relational databases and differ from NoSQL databases quite a lot. The first misconception about NoSQL is that it wouldn’t use SQL like the name might suggest. In fact, NoSQL stands for Not Only SQL, which means it does use SQL and is more than just SQL.

While relational databases use tables and columns, they don’t exist in NoSQL. Therefore some like to call NoSQL databases non-relational databases, which hints that the two are very different from each other. There are many different types of NoSQL databases for different purposes: document storages, key-value databases, cache systems and more. The most popular NoSQL database is MongoDB which is a document database.

Advantages of NoSQL

One advantage of document databases is that the data your store doesn’t have to be predefined. With relational databases, you have to define the columns of a table and what kind of data they can hold. In document databases, you can store any type of data inside the “columns” or keys. A document usually consists of key-value pairs and looks like JSON. Another advantage is that the keys in one document don’t have to match with a similar document. For instance, one user document can have a list of hobbies and another user can have a physical address but neither of these is mandatory for all users.

NoSQL databases were built with performance and scalability in mind. When working with big data and large data sets, NoSQL is often the way to go. NoSQL databases can easily be scaled on a scale-out basis, which means you can host a single database on multiple servers.

Disadvantages of NoSQL

While all this sounds great, NoSQL doesn’t make relational databases redundant. Relational databases tend to handle relationships better. If your data is strongly related, you may want to go with a relational database instead.

While a flexible data structure can be an advantage for NoSQL databases, the strict structure of relational databases can also be seen as an advantage. If your data is well structured and the records don’t differ significantly from each other, a column structure helps with normalization and keeping up data integrity.

Introduction to NoSQL, 5.0 out of 5 based on 2 ratings
Categories: Software & Webapps, Tips & Tricks

Keywords:

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet (leave a comment)

You are welcome to initiate a conversation about this blog entry.

Leave a comment

You must be logged in to post a comment.