NoSQL Databases Types 2019 | Programmer Friendly

Posted on the 18 September 2019 by Aben @appscrip

27 total views, 27 views today

A collection of information that is systematized with the aim to retrieve, manage and organize is referred to as a Database. Any software development needs a reliable database. The database needed is a strategic decision so as to optimize the software architecture.

There are mainly two types of database.

SQL - Such as: Oracle, MySQL, PostgreSQL, Microsoft SQL Server

NoSQL - Such as: Couchbase, MongoDB, Redis, Cassandra

NoSQL means 'not only SQL database' and SQL is a relational type database.

NoSQL database is a non-relational kind of database system utilized to store and retrieve data. Generally it is not always possible to store data in a table format with fixed schemas. Such as GEO-location data, Social graphs, IoT & user generated data. Over and above data nowadays is being churned out is in exponential figures.

Data needs to be stored, processed, retrieved and interpreted to be utilized in numerous beneficial ways. NoSQL databases have such capabilities. With NoSQL database storing and retrieval of: document, graph based data, key-value data are effortless and quick. Hence we can definitely avoid intricate SQL joins processes. NoSQL databases are scalable horizontally for web and enterprise business applications.

The simplicity of design and the ability to scale horizontally gains favour for NoSQL databases types which is otherwise challenging to accomplish using RDMS databases.

Document Databases - The document databases pair each key with a complex data structure termed as a document. Documents may have key-value pairs or key-array pairs or nested documents. Document NoSQL databases are: MongoDB, Couchbase, ArangoDB, Apache CouchDB, Cosmos DB, OrientDB, IBM Domino, MarkLogic.

Key-value stores - All items are stored as a Key-value pair. The key-value stores are among the simplest kind of databases among NoSQ Databases. Key-value NoSQL databases are: Redis, Apache Ignite, Memcached, and Riak.

Wide-column stores - Where large dataset are involved data is stored in column format rather than rows as querying can be then done by Wide-Column databases. Such as Cassandra, Scylla, and Hbase.

Graph stores - Finally when the data is in the form of graphs, social connections, networks, road-maps and transport links we us Graph type NoSQL DB such as AllegorGraph or Neo4j.

Elasticsearch an open-source full text search, scalable, real-time distributed, enterprise-grade search engine.

Here we shall take a look at 4 NoSQL Databases in detail.

Cassandra has the ability to handle large quantity of structured data. It was developed to search inbox for Facebook and is a distributed type of data storage system. The data is usually spread out among several commodity servers. The storage capacity of data can be increased effortlessly by taking the service online. It does not involve complex structures as all nodes are in the same cluster.

Cassandra is written in Java is a SQL type language and is the second best open source database used by Facebook, Cisco, Twitter, eBay, Netflix, Rackspace and others.

  1. Scalable linearly
  2. Has quick response time
  3. Properties supported: ACID - Atomicity, Isolation, Consistency, and Durability.
  4. MapReduce is supported with Apache Hadoop
  5. Data distribution flexibility is good
  6. Peer-to-peer architecture
  • Highly scalable
  • Single point of failure rare
  • Multi-DC Replication
  • Can integrate over other JVM applications
  • Suitable for redundancy, multiple data center deployments, failover and disaster recovery

Redis stands for Remote Dictionary Server. Redis is basically composed in C language and supports C++, Ruby, Perl, PHP, Scala and others. It is well known among all key-value stores. Redis can manage up to 2 to the power of 32, i.e, is roughly 4.3 billion keys. In fact it was tested to handle a minimum of 250 million keys at every instance. Redis stores all data in the RAM and backs-up on the disk as it is in-memory with on-disk persistent database.

  • Aggregations poor support
  • Performance not predictable
  • Ad-hoc query not supported
  1. Automatic failover
  2. Entire database held in memory
  3. Lua scripting, which is easier than Python too.
  4. Can replicate data to scores of slaves
  5. Keys have a limited time
  6. Eviction of keys through LRU
  7. You can Publish/Subscribe

HBase composed in Java 8 and authorized under Apache. This is a non-relational distributed database designed for Big-Table databases by Google. HBase can host billions of rows, millions of columns and utilizes Java API for user access. Capacity can be increased by adding servers and availability of data is ensured by multiple master nodes.

  • Diverse types of data are supported
  • Easy to install
  • Performs 110000 SETs per second, 81000 GETs per second
  • Multi-utility tool
  • Redis Sentinel can create replication into distributed systems.
  • Doesn't support joins
  • Knowledge of Lua necessary for procedures
  • Dataset has to fit in memory

Memcached has been adopted by Facebook, Netlog, Wikipedia, Flickr, YouTube, Twitter and others. It's a high performance, open source, distributed memory caching system with capabilities to enhance dynamic web applications by decreasing database load. This is a key-value of strings or objects stored in the memory, causing database calls, API calls, or page-rendering.

  1. Automatic failure diagnosis support
  2. Linearly scalable
  3. Data replication provision
  4. Integrates with Hadoop, as a source as well as destination
  • Fast lookups in large tables.
  • Low latency access from billions of single row records
  • Java API for client
  • Auto-sharding
  • License-free
  • Can manage large datasets with HDFS file storage
  • Schema design flexibility
  • High-speed
  • Transactions not supported
  • No built-in authentications and permissions
  • Indexing and sorting on key.
  • When one HMaster is used Single point of failure may occur
  • SQL structure not supported
  • Memory issues (on cluster)
  1. Client-server application (over TCP/UDP)
  2. Reduces database load
  3. Server is a huge hash-table
  4. Competent where database load is huge
  5. Memory caches combined to a logical pool
  • Installation is quick
  • Huge community and widely documented
  • Supported on Linux OS or those similar to BSD
  • Data redundancy, locks, CAS, read-throughs not supported