NoSQL or Non-Relational DBMS is the recent buzz in models for data storing and retrieving data. As any other database management system the sole purpose NoSQL is also simplification and consistency in data management. RDMBS have ruled the data management sector for over 4 decades and has been promising till date. Then where and how does NoSQL stands apart and what is the need to design new DBMS. The intent of NoSQL is to provide the more consistent model than traditional management systems. The inspiration behind the concept is to provide the horizontal scalability and fine control over high availability. NoSQL database are significantly used in big data and real-time web application systems.
So what are the difference between two models? Let us walk first have walk through relational or also called structured model of databases. Structured database have their hard coded rules that govern the atomicity, consistency, integrity and durability (ACID). If any of the property is not met or violated the database is prohibited and needs attentions. Now in case of NoSQL, ACID property is turned up-side-down. How? NoSQL follows BASE property. Unlike ACID it is not the set of property but simple guidelines. BA-basic availability, S-soft state and E-eventual consistency.
Unlike structured database, data in NoSQL is stored in Key-Value format. No need to create the table and store the data in multiple rows with some primary key- foreign key. Simply store value for each individual key, store in database, and allow simple retrieval. It’s interesting to know if there no table in database, then where and how data is stored. Here it is learn understand the beauty of the architecture, which very simple and easy to understand.
The NoSQL database uses the hash function at core level – a well know algorithm that takes a variable length input and gives fixed-length consistent output. The key of every key-value pair provided to a NoSQL database is hashed and this hash value is used to direct the pair to a particular NoSQL database server, where the record is stored and retrieved as required. When any application request for data retrieval for key value pair, the key is provided to database as an input. This key is then hashed again to find the appropriate server where the data would be stored (if the key exists in the database) and then the database engine retrieves the key-value pair from that server.
There are different type of NoSQL Databases viz. Key-Value Store NoSQL Databases, Document Stores NoSQL Database, Graph Store NoSQL Database and Columnar Stores NoSQL Databases.
- Key-Value simple as explained above in introduction. Store data associated with key in database which can be retrieved using hash function as required.
- Document Stores NoSQL Database – it is composed of metadata of the document along with key-value pair of data. The document may be XML, PDF, and DOC etc. or of any supported format.
- Columnar NoSQL Databases – these are mixture of relational and non-relational type of databases. They do provide some sort of structuring but do not strictly follow rules of RDBMS.
- Graph Store NoSQL – multiple-attribute tuples/fields can be stored example graphs can be stored showing banking details or reports.
No doubt NoSQL provides and promises more than traditional database management system, but the concept had lot more to prove before replacing relation databases completely. If we can see limitations in RDBMS, for sure there are many limitation with NoSQL has. But yes for sure NoSQL has bright future ahead in lightweight data storage in highly efficient and consistent manner.