When discussing the topic of databases, most people think of a relational database. Where data is stored in tables and is related to each other through the use of primary and foreign keys. The growing interest in big data has led some companies to forgo the standard RDBMS in favor of a system that better suits their needs. This is where NoSQL comes in. NoSQL – or “Not Just SQL” – uses different data structures to host data. These structures might look similar to a relational database but others look completely different. Depending on the specific structure used, the choice of database management systems will also change. There are four common data models to use; Key/value stores, document databases, table-style databases, and graph databases (data access for highly scalable solutions). Key Value Stores Looking at the different data storage models, this is the simplest to implement. This is one way to have a schema-free design for data storage. In essence, the store will act as a large hash table separated into keys and values (ref. Data Access). For the DBMS, the values are opaque – a random assortment of 1s and 0s – and the application sitting on top of the database will then translate the binary code into useful information. Hash functions are then used to determine where the values will be physically stored. Document databases Document databases are similar to key/value stores but documents are stored within the database, not values. Documents can come in many different forms such as XML, Microsoft Word documents, and even PDFs. Like a key/value store, a document database will assign each document a unique key to locate it, and end users will be able to query based on the key. The...... half of the card...... stores transactions in the database. NoSQL abandons ACID and uses BASE. Base stands for Basically Available, Soft State and Possible Consistency. Basically available means that the system will be available, although end users may receive error messages due to the change in data status. The soft state means that the system will always be updated or changed over time. Because it is constantly changing, it is never assumed that the data is concrete or where it is located with certainty. Finally, eventual consistency means that a consistent state will occur once it has finished receiving input from users (Joe Celko's guide to NoSQL). Using this BASE model gives NoSQL better performance at the expense of data consistency. As stated earlier, NoSQL, when given the choice between the three options in the CAP theorem, would choose availability and partition tolerance over consistency.
tags