HBase vs. MongoDB vs. MySQL vs. Oracle vs. Redis, the primary key of the three major open-source NoSQL databases, the two mainstream traditional SQL databases, nosqlredismongodb

Source: Internet
Author: User
Tags cassandra riak neo4j ocaml

HBase vs. MongoDB vs. MySQL vs. Oracle vs. Redis, the primary key of the three major open-source NoSQL databases, the two mainstream traditional SQL databases, nosqlredismongodb

HBase vs. MongoDB vs. MySQL vs. Oracle vs. Redis, the primary key of the three major open-source NoSQL databases, two mainstream traditional SQL databases
Category HBase MongoDB MySQL Oracle Redis
Description Column Storage Based on Apache Hadoop and BigTable One of the most popular document storage Databases Widely used open source RDBMS Widely used RDBMS Data structure storage in memory, used as a database, cache, and Message Middleware
Popularity level (refer to the trend chart below) Level 15 (59.03 points) Level 4 (300.57 points) Level 2 (1277.75 points) Level 1 (1463.37 points) Level 10 (100.65 points)
Database Model Column Storage Document Storage Relational Database System Relational Database System Key-value Storage
Official Website Hbase.apache.org Www.mongodb.org Www.mysql.com Www.oracle.com/-us/-products/-database Redis. io
Technical documents Hbase.apache.org Docs.mongodb.org/-manual Dev.mysql.com/-doc Www.oracle.com/-technetwork/-indexes/-documentation/-index.html Redis. io/-documentation
Developer Apache Software Foundation MongoDB Oracle Oracle Salvatore Sanfilippo (father of Redis)
Initial Release 2008 2009 1995 1980 2009
Current version 1.1.0.1, December May 2015 3.0.5, December 5, July 2015 5.6.26, December July 2015 12 Release 1 (12.1.0.2), January 1, July 2014 3.0.3, December 3, June 2015
License Open Source Open Source Open Source Business Open Source
Whether the database is a service (DBaaS) No No No No No
Implementation Language Java C ++ C and C ++ C and C ++ C
Server Operating System Linux
Unix
Windows
Linux
OS X
Solaris
Windows
FreeBSD
Linux
OS X
Solaris
Windows
AIX
HP-UX
Linux
OS X
Solaris
Windows
Z/OS
BSD
Linux
OS X
Windows
Structured Data? Free Free Yes Yes Free
Pre-defined data type? No Yes Yes Yes Part
XML supported? No   Yes Yes No
Whether secondary indexes are supported No Yes Yes Yes No
SQL supported or not No No Yes Yes No
API and other access methods Java API
RESTful HTTP API
Thrift
Use JSON-specific protocols ADO. NET
JDBC
ODBC
ODP. NET
Oracle Call Interface (OCI)
JDBC
ODBC
Dedicated Protocol
Supported programming languages C
C #
C ++
Groovy
Java
PHP
Python
Scala
Actionscript
C
C #
C ++
Clojure
ColdFusion
D
Dart
Delphi
Erlang
Go
Groovy
Haskell
Java
JavaScript
Lisp
Lua
MatLab
Perl
PHP
PowerShell
Prolog
Python
R
Ruby
Scala
Smalltalk
Ada
C
C #
C ++
D
Eiffel
Erlang
Haskell
Java
Objective-C
OCaml
Perl
PHP
Python
Ruby
Scheme
Tcl
C
C #
C ++
Clojure
Cobol
Eiffel
Erlang
Fortran
Groovy
Haskell
Java
JavaScript
Lisp
Objective C
OCaml
Perl
PHP
Python
R
Ruby
Scala
Tcl
Visual Basic
C
C #
C ++
Clojure
Crystal
D
Dart
Elixir
Erlang
Fancy
Go
Haskell
Haxe
Java
JavaScript (Node. js)
Lisp
Lua
MatLab
Objective-C
OCaml
Perl
PHP
Prolog
Pure Data
Python
R
Rebol
Ruby
Rust
Scala
Scheme
Smalltalk
Tcl
Supports server scripts? Yes JavaScript Yes PL/SQL Lua
Triggers supported? Yes No Yes Yes No
Splitting Method Parts Parts Horizontal Split: use MySQL Cluster or MySQL Cluster for sharding Horizontal segmentation Parts
Master-slave replication Mode Multiple master-slave replication mechanisms Master-slave Replication Master-master Replication
Master-slave Replication
Master-master Replication
Master-slave Replication
Master-slave Replication
MapReduce supported? Yes Yes No No No
Data Consistency in Distributed scenarios Consistent immediately Final consistency
Consistent immediately
  Consistent immediately Final consistency
Whether foreign keys are supported No No Yes Yes No
Transaction supported? No No ACID ACID Optimistic lock mechanism, atomic execution of command blocks and scripts
Concurrency supported? Yes Yes Yes Yes Yes
Whether persistent storage is supported Yes Yes Yes Yes Yes
Memory storage supported? No   Yes Yes Yes
Access Control Access Control List (ACL) User and Role-Based Access Permissions Fine-grained user access permissions Fine-grained access permissions based on SQL standards Simple Password-Based Access Control

Appendix 1: trend chart of popularity level


Appendix 2: two figures show you how to choose between SQL, NewSQL, and NoSQL

Figure 1: Do I Need SQL or Hadoop?



Figure 2: SQL vs. NewSQL vs. NoSQL



Appendix 3: Interview Excerpt from Salvatore Sanfilippo, father of Redis

  • Redis is an open-source, advanced key-value database and data structure service program. The middle key can store strings, hashes, lists, sets, and ordered sets.
  • The Redis kernel is written in standard ansi c based on an event model.
  • Non-blocking replication is the design goal of Redis.
  • Replication in Redis is asynchronous.
  • Currently, Redis databases are provided for many languages (including most common languages.
  • C client is the only officially supported package.
  • Redis Pub/Sub is very suitable for real-time applications.
  • Some Redis users use it as a database, some as a message bus, and some as a cache.

Appendix 4: NoSQL database types

List of NoSQL database types
Database Type Description Mainstream Products Who is using it? Applicable scenarios Unsuitable scenarios
Key-Value Database Key-value databases are like hash tables used in traditional languages. You can use keys to add, query, or delete data. Because primary key access is used, the performance and scalability are good. Riak, Redis, Memcached, Amazon's Dynamo, Project Voldemort GitHub (Riak), BestBuy (Riak), Twitter (Redis and Memcached), StackOverFlow (Redis), Instagram (Redis), Youtube (Memcached), Wikipedia (Memcached) Stores user information, such as sessions, configuration files, parameters, and shopping carts. This information is generally linked to the ID (key). In this case, the key-value database is a good choice. 1. Instead of querying by key, you can query by value. The Key-Value database does not use the Value query method at all.
2. The relationship between data needs to be stored. In the Key-Value database, two or more keys cannot be used to associate data.
3. transaction support. Rollback cannot be performed when a fault occurs in the Key-Value database.
Document-Oriented database Document-oriented databases store data as documents. Each document is a self-contained data unit and a collection of data items. Each data item has a name and a corresponding value. The value can be either a simple data type, such as a string, number, or date, or a complex type, such as an ordered list and associated objects. The minimum unit of data storage is document. The document attributes stored in the same table can be different. data can be stored in XML, JSON, JSONB, and other forms. MongoDB, CouchDB, RavenDB SAP (MongoDB), Codecademy (MongoDB), Foursquare (MongoDB), and NBC News (RavenDB) 1. logs. In an enterprise environment, each application has different log information. The Document-Oriented database does not have a fixed mode, so we can use it to store different information.
2. Analysis. Given its weak pattern structure, you can store different measurement methods and add new measurements without changing the pattern.
Add transactions on different documents. The Document-Oriented database does not support inter-Document transactions. If you have requirements for this, you should not choose this solution.
Column Store (Wide Column Store/Column-Family) Database The column storage database stores data in the column family. A column family stores data that is frequently queried together. For example, if we have a Person class, we usually query their names and ages together rather than their salaries. In this case, the name and age are put into one columnfamily, while the salary is in another columnfamily. Cassandra, HBase Ebay (Cassandra), Instagram (Cassandra), NASA (Cassandra), Twitter (Cassandra and HBase), Facebook (HBase), Yahoo! (HBase) 1. logs. Because we can store data in different columns, each application can write information to its own column family.
2. blog platform. Each information is stored in different columns. For example, a tag can be stored in one, a category can be stored in one, and an article can be stored in another.
1. If ACID transactions are required. Vassandra does not support transactions.
2. prototype design. If we analyze Cassandra's data structure, we will find that the structure is based on the expected data query method. At the beginning of model design, it was impossible to predict the query method. Once the query method changed, we had to redesign the column family.
Graph (Graph-Oriented) Database Graph database allows us to store data in graphs. Objects are used as vertices, while relations between entities are used as edges. For example, if we have three entities: Steve Jobs, Apple, and Next, there will be two "Founded by" sides connecting Apple and Next to Steve Jobs. Neo4J, Infinite Graph, OrientDB Adobe (Neo4J), Cisco (Neo4J), T-Mobile (Neo4J) 1. In some highly correlated data
2. recommendation engine. If we present the data in the form of graphs, it will be very beneficial for recommendation formulation.
Unsuitable data model. Graph databases have a small scope of application, because few operations involve the entire graph.

References

  • HBase vs. MongoDB vs. MySQL vs. Oracle vs. Redis Popularity
  • Eliminate the current NoSQL type, applicable scenarios and use companies
  • Interview with Salvatore Sanfilippo, father of Redis
  • A figure shows whether SQL or Hadoop is required.


Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.