Inside NoSQL – Not only SQL

Inside NoSQL

Inside NoSQL – Not only SQL 

Overview –

NoSQL stands for Not only SQL, which means a database with some extended features of RDBMS. Today databases like NoSQL are gaining popularity in the enterprise.

One of the most known examples of NoSQL database is MongoDB.








Its benefits include:

  • NoSQL database like MongoDB is used in big-data, real-time applications, and cloud computing.
  • It came into existence to overcome the limitations of RDBMS.
  • Provides a flexible schema less model.
  • Simplifies the interaction between the application and the database.

RDBMS was not designed to solve scalability issues faced by current applications. NoSQL’s flexible data model addresses some issues not considered by RDBMS.

  • Object oriented programming.
  • Well-organized architecture.
  • Quick Iteration.
  • Structured, semi-structured and unstructured data.

Advantages of NoSQL DB over RDBMS

  • Complex joins are not there.
  • It’s easy to scale NoSQL database.
  • NoSQL supports dynamic queries on documents.

To make things more clear, here I am differentiating NoSQL and SQL databases before commencing with NoSQL insights.

Basis NoSQL MySQL
History 2000s Part of tech world since 1970s
Purpose For dealing with the limitations of SQL database. For commencing the data storage phase.
Schema Dynamic Schema, dissimilar data could be stored together easily. Allows data insertion without any predefined schema. Fixed schema in the form of rows and columns. Structure and data-types are fixed before.
Development Model Open Source MySQL, Oracle Database, a collaboration of closed and open source.
Data Manipulation Object Oriented API’s are used. Queries – Select, Insert, Update, etc.
Scaling More scalable i.e. database automatically spreads data across servers if there is a requirement. Less scalable i.e. the SQL server could be spread over many servers, but it requires additionally engineering.
Example MongoDB, HBase, etc. MySQL, Oracle Database, etc.

 

In this article, we’ll discuss some insights in NoSQL. I’ll assume that you have some understanding of Relational Database Management System (RDBMS).

What are the 10 Insights in NoSQL?

Here are the some insights in NoSQL.

Where to use NoSQL database

  • Big Data
  • Multiple Users
  • Mobile Infrastructure
  • Content delivery and Management

Relationship with RDBMS

Relational database management system (RDBMS) is based on relational database model by E.F.Codd. They frequently replaced legacy hierarchical and network databases models.

Here is the relationship of NoSQL terminology with RDBMS.

RDBMS MongoDB
Database Database
Table Collection
Tuple/Row Document
column Field
Table Join Embedded Documents
Primary Key Primary Key,
where Default key _id provided by mongodb.

Handling relational data

NoSQL handles relational data as well. Most NoSQL do not have the ability for joins in queries.  These ways are there to handle relational data in NoSQL database.

  • More data could be inserted in smaller number of collections through NoSQL database.
  • It’s common to use different queries to retrieve a large amount of data. As NoSQL queries are faster than traditional SQL queries, so the cost of doing additional queries is acceptable.

Database Types

It could be classifies as.

·         Document Databases

It is the notion of a document. For Example, SimpleDB, MongoDB, etc.

Different implementations offer different ways of organizing documents, like
collections, tags, non-visible metadata, directory hierarchies, etc.

·         Graph Store

Graphs are interconnected elements with an undetermined number of relations between the).It is used to store network information. For Example, Neo4J, OrientDB, etc.

It includes social data, network data, route map, etc.

·         Key-value stores

Key-value stores use the associative array data model. Associative arrays are maps and dictionaries. The data is represented as a collection of key-value pairs, in a way that each possible key appears at most once (in the collection).

For Example, CouchDB, FoundationDB, etc.

·         Wide-column stores

These are optimized for queries over large datasets.

Data Storage Model

Minor changes in data model can be a big headache for database like RDBMS, but the data storage model of NoSQL is flexible. The application can virtually store any structure using NoSQL Key Value stores and document databases. For Example, the data gets stored into documents using JSON.

However, relational model gets data and stores it into a number of tables interrelated with other. Here, data is saved in rows and columns and joined with other table rows and columns data. Foreign keys are used to reference tables. For Example, Employee table data arranged in rows and columns and connected with Database table using a unique db id.








Automatic Replication

NoSQL databases support automatic replication. Replication is a process to create and manage duplicate versions of a database. However, there is no need to assign this task to any other application in NoSQL due to its automatic replication characteristic.

This leads to reliable code integration, faster development, and less time invested on management.

Schema

In relational database, schema is to defined first before moving further. For Example, while storing data for employees, i.e. name, id, department, address, phone, the SQL structure should have prior information of what is being stored. Let say after this, now there is a need to add new column, employee joining date to the database. For this, new column would be added, and then the complete database would be migrated to the new schema.

NoSQL, with its dynamic schema, allows data insertion without any predefined schema. Through this, it’s easier to make real time changes to the application, and records could be added anywhere easily. This further makes development faster and code integration reliable. Even, database administrators do not have to invest n number of hours for this.

Cheaper

NoSQL database uses clusters of cheaper servers to handle large data and transaction volumes, while RDBMS has expensive servers. Therefore, cost per gigabyte is less than the cost of RDBMS.

As a result, its use is increasing among internet companies, because it is the need of modern applications.

Scalable

At some point, with relational database, some issues could arise with the server if the data requirements and number of users increase drastically. For addressing this, the servers may get divided into two or more. This in turn will introduce complexities in the system.

NoSQL databases were developed to solve these kinds of issues. It provided a better approach to scaling. It’s more scalable when compared with RDBMS and tolerates database failures with a ease. Many organizations use NoSQL for building high performance systems.

For Example, ebay uses MongoDB, a NoSQL database for saving their media data.

Yandex, Russia’s largest search engines uses MongoDB for managing user data and metadata.

Challenges

These are some challenges still faced by NoSQL.

  • RDBMS is here from a long time, unlike NoSQL, whose alternatives are still in pre-production phase.
  • NoSQL databases installation and maintenance requires a lot of skills. RDBMS is much easier to maintain.
  • The support for RDBMS is still far better than NoSQl.  Strengthening its support is the biggest challenge.
  • Less service is provided for ad-hoc query and analysis..









Summary

NoSQL database is becoming significant part of database world, especially with today’s Big Data, cloud computing, and Web needs.  According to a survey by research firm IDC, by 2020, 32 billion things will be connected to the Internet.

Innovative enterprises and companies are investing a lot in Internet of things for developing new products with reduced costs. They want less wastage and real time data access for satisfying customers. As NoSQL overcomes all these challenges, we can say that it has a bright future to scale data access to billions of connected devices

However, there are still many challenges faced by NoSQL and therefore would need some more years to outshine like RDBMS.

============================================= ============================================== Buy best TechAlpine Books on Amazon
============================================== ---------------------------------------------------------------- electrician ct chestnutelectric
error

Enjoy this blog? Please spread the word :)

Follow by Email
LinkedIn
LinkedIn
Share