Saturday, September 26, 2020
dbametrix
More
    Home Database Technology SQL vs noSQL Which is better

    SQL vs noSQL Which is better

    Blog post explains basic differences of sql and nosql and when it is better to use nosql for getting best performance and security.

    SQL vs noSQL Database: Which is BETTER?

    Historically, a relational database has focused on the reliability of transactions under the well-known ACID principle, an acronym for Atomicity, Consistency, Isolation and Durability (Atomicity, Consistency, Isolation and Durability in Spanish). Under these properties it is intended that a transaction on a database is always completed or not (atomicity), that the data is kept in a valid state at all times (consistency), that it is independent (isolation) and that it is permanent against failures. of the system (durability).

    The ACID principle brings robustness that collides with performance and operability as data volumes grow.

    ACID principle, typical of relational databases:

    - Advertisement -
    dbametrix

    When the magnitude and dynamism of the data become important, the ACID principle of relational models takes a back seat to performance, availability and scalability, the characteristics most typical of NoSQL databases. Today, modern data systems on the Internet are more in line with the also known BASE principle, acronym for Basic Availability (availability as priority) Soft state (data consistency is delegated to management external to the database engine) Eventually consistency (trying to achieve convergence towards a consistent state)

    The basic principle, common in NoSQL DB:

    The main difference between a relational database (RDBMS) and a NoSQL lies in the concept of the structure of the data. With a NoSQL model, information is stored in more flexible ways that do not have the restriction of adopting a predefined format, as occurs in relational databases (tables whose structure follows a schema). Thanks to this, it is much easier to distribute data between systems without having to maintain a complex migration mechanism. Furthermore, this design benefits horizontal scalability by simply adding nodes to distribute the load, which takes advantage of the vertical scalability (increased processing power and memory) needed in relational databases. These reasons mainly, make NoSQL databases the candidates to adopt when it comes to handling large volumes of data of a very varied nature.

    NoSQL database types and classification:

    There are about 150 types of NoSQL databases with different data architecture (document-based, key / value-based, object-based, graph-based, column-based, etc.). Among the best known are Cassandra, Hadoop, MongoDB, CouchDB or Redis. Giants like Oracle also have a NoSQL implementation.

    According to the type or model chosen to store the data, NoSQL databases are grouped into four main categories:

    1.     Key / Value: Data is stored and is located and identified using a unique key and value (a data or pointer to the data). Examples: DynamoDB, Riak, Redis. Amazon and Best Buy among others use this implementation
    2.     Columns: Similar to the key / value model, but the key is based on a combination of column, row, and timestamp that is used to reference sets of columns (families). It is the most similar implementation to relational databases. Examples: Cassandra, BigTable, Hadoop / HBase. Companies like Twitter or Adobe make use of this model.
    3.     Documents: The data is stored in documents that encapsulate the information in XML, YAML, or JSON format. Documents have self-contained field names in the document itself. The information is indexed using those field names. Examples: MongoDB, CouchDB. We have a case of use of this technology with Netflix, a company that provides audiovisual content online.
    4.     Graphs: A graph model is followed that is spread across multiple machines. It is an appropriate model for data whose relationships conform to this model, such as transport networks, maps, etc. Examples: Neo4J, GraphBase.
    - Advertisement -
    dbametrix

    It means when we are requiring very large database then it is better idea to use nosql instead of sql.Your data needs scale up, out, and down. As discussed above, NoSQL provides much greater flexibility along with the power to control costs as the data needs change.You have a lots of data, a variety of data types, and your data needs is only going to grow as time passes. NoSQL allows you to keep various different forms of data together and without needing to invest time into defining which kind of data you’re storing ahead of time.

    Consider Reading to these articles:

    - Advertisement -
    dbametrix
    - Advertisment -
    dbametrix

    Most Popular

    ORA-01194: file 1 needs more recovery to be consistent

    The blog post explains how to restore and recover database using until cancel with error ORA-01194

    How to enable Archivelog

    This blog post explains how to enable archive log mode in Oracle database for newest versions.

    Shared vs Static Library Performance

    The article explains the benefits of a shared library and static library usage in application building for improving application performance.

    Migration methods of Oracle Database

    Blog post explains which tricks and methods are simple to perform migration of small and large Oracle database

    Recent Comments