NoSQL and Version Controlling
What is NoSQL?
For some context and better understanding, let’s take a look at what NoSQL is. As the term suggests, it stands for non-SQL-related databases that are non-relational, mostly, and are free of schema. NoSQL databases are distributed and can be horizontally scalable. They can also be vertically scaled as well. Another characteristic of NoSQL databases is that they are easily replicable.
They are also eventually consistent, mostly open-source, and do not support transactions.
Why use NoSQL?
Now, let’s look at a few perks and the reasons that are underlying the use of NoSQL.
It removes the burden of data structure mismatches between application in-memory and the relational database. They are also able to be integrated using services, namely elastic search. NoSQL also provides a solution to the inefficiency of relational databases on clusters.
Also, since, they are aggregate-oriented databases, they are easier to manage inside clusters and are based on domain-driven design, which is to say order details inside the order.
The CAP theorem
Consistency, Availability, and Partition tolerance stand simply for CAP. Let’s take a look into what each of them means and a few examples of them.
- Consistency-Every read receives the most recent write.
- Availability-Every request receives a response. This, however, does not mean that it is the most recent write.
- Partition tolerance-The system will continue to operate despite the number of messages lost among nodes
These characteristics, however, can only be found two at a time and all three cannot be satisfied at the same time.
NoSQL databases can be divided into four categories, depending on the type of structure.
Data are stored as key-value pairs
Data are stored as documents, using JSON, BSON, XML, in maps or collections
3. Column family
Data are stored as rows that have multiple associated columns
Entities(nodes) and relationships(edges) are used to store data
This is one of the first options for developers when choosing a NoSQL database. Let’s take a look at a few of its characteristics.
MongoDB has strong query capabilities with aggregations using JS. It uses the SpiderMonkey JS engine. MongoDB also has high availability with replica sets and reads and writes on primary by default. It is also eventually consistent on secondary instances and MongoDB also comes in with built-in file storage called Grid File System.
First and foremost, let’s take a look into what version controlling is about.
What is version controlling?
Version controlling is a procedure to manage changes done to an underlying source. The changes that are made to that source are identified using a revision number. This number has a timestamp and the person who contributed towards the change. These revisions can be
Version controlling allows managing multiple revisions of the same unit of information.
Why use version control?
Version control is a must for developers if they want to make life easy for themselves. It comes with a multitude of benefits.
Version controlling provides easier mechanisms for backups and a centralized source code repository. This also allows for collaborative development and provides an overview for changes performed to a file. Version controlling also gives access control and provides the ability to resolve conflicts.