NoSQL Databases
NoSQL Database
v NoSQL Introduction:
NoSQL (not only SQL) databases are non-tabular databases and store data differently than relational tables. NoSQL databases com in a variety of types based on their data model. The main types are document, key-value, wide-column, and graph. They provide flexible schemas and scale easily with large amounts of data and high user leads.
NoSQL is a non-relational DMS, that does not require fixed schema, avoid joins and is easy to scale. The concept of NoSQL databases became popular with internet giants like Google, Facebook, Amazon, etc. who deal with huge volumes of data. In the year 1998- Carlo Strozzi use the term NoSQL for his lightweight, open-source relational database.
v History of NoSQL databases:
NoSQL databases emerged in the late 2000s as the cost of storage dramatically decreased. Gone were the days of needing to create a complex, difficult to manage data model in order to avoid data duplication. Developers were becoming the primary cost of software developments, so NoSQL databases optimized for developer productivity.
As storage costs rapidly decreased, the amount of data that applications needed to store and query increased. This data came in all shapes and sizes structured, semi-structured and polymorphic- and defining the schema in advance became nearly impossible. NoSQL databases allow developers to store huge amounts of unstructured data, giving them a lot of flexibility.
Additionally, the Agile Manifesto was rising in popularity, and software engineers were rethinking the way they developed software. They were recognizing the need to rapidly adapt to changing requirements. They needed the ability to iterate quickly and make changes throughout their software stack- all the way down to the database. NoSQL
database gave them this flexibility.
2000- Graph database Neo4j is launched
2004- Google BigTable is launched
2005- CouchDB is launched
2007- The research paper on Amazon Dynamo is released
2008- Facebook open sources the Cassandra project
2009- The term NoSQL was reintroduced
v NoSQL Features:
Each NoSQL database has its own unique features. At a high level, many NoSQL databases have the following features;
1. Non-Relational:
ü Never provide tables
ü Work with self-contained aggregates or BLOBs
ü Doesn’t require object relational mapping and data normalization
ü No Complex features like query languages, query planners, referential integrity joins, ACID
2. Flexible schemas:
ü NoSQL databases are either schema free of have relaxed schemas.
ü Do not require any sort of definition of the schema of the data.
ü Offers heterogeneous structures of data in the same domain.
3. Simple API:
ü Offers easy to use interfaces for storage and querying data provided.
ü APIs allow low-level data manipulation & selections methods
ü Text based protocols mostly used with HTTP REST with JSON
ü Mostly used no standard based query language
ü Web-enabled databases running as internet facing services
4. Distributed:
ü Multiple NoSQL databases can be executed in a distributed fashion
ü Often ACID concept can be sacrificed for scalability and throughput
ü Only providing eventual consistency
v Types of NoSQL databases:
Over time, four major types of NoSQL databases emerged: document databases, key-value databases, wide-column stores, and graph databases.
1. Document Databases:
Store data in documents similar to JSON (JavaScript Object Notation) objects. Each document contains pairs of fields and values. The values can typically be a variety of types including things like strings, numbers, Booleans, arrays or objects.
2. Key-value databases:
These are a simpler type of database where each item contains keys and values.
3. Wide-column stores:
This stores store data in tables, rows and dynamic columns.
4. Graph databases:
This database store data in nodes and edges. Nodes typically store information about people, places and things, while edges store information about the relationships between the nodes.
v Advantages of NoSQL:
1. Can be used as primary or Analytic data source
2. Big data capability
3. No single point of failure
4. Easy Replication
5. No need for separate caching layer
6. It provides fast performance and horizontal scalability
7. Can handle structure, semi-structured and unstructured data with equal effect
8. Object –Oriented programming which is easy to use and flexible
9. NoSQL databases don’t need a dedicated high performance server
10. Support key developer languages and platforms
11. Simple to implement than using RDBMS
12. It can serve as the primary data source for online applications.
13. Handles big data which manages data velocity, variety, volume and complexity
14. Excels at distributed database and multi data center operations
15. Eliminates the need for a specific caching layer to store data
16. Offers a flexible schema design which can easily be altered without downtime
v Database as a Service v/s locally database:
Data trapped in trillions makes accessing coherent information sources complex and often causes mission- critical application failures. So, what’s the best way to make database management organized, secure, scalable, compatible and accessible?
The answer lies in choosing the right Database as a Service (DBaas) provider.
ü What is DBaas?:
Database as a Service (DBaas), also known as managed database service or cloud database service, refers to cloud computing services that let users set up, operate, manage, and scale databases. These managed database service platforms don’t require users to install software, set up physical hardware, or make performance configurations.
Suppose your application development team needs a database that mirrors the production environment. It’ll take weeks or even months to build the database using a structured query language (SQL) or NoSQL in an on-premises environment, with developer hours, power bill footing, and the overhead of hardware assembly and software installation.
DBaaS simplifies the building process. DBaaS platform allows the database team to create a cloud database almost instantly without requesting database resources or waiting for server infrastructure provision.
Moreover, the team can use cloning capabilities to create database copies with unlimited hardware resources. This means they can replicate the development environment for simultaneous and agile work on a cloud based repository. Here are the DBaaS features that make it super easy for application development teams to create cloud databases and start app development almost instantly.
Features of DBaaS:
1. Allows database provisioning using a self-service model
2. It’s on- demand, meaning you pay for what you use
3. Offers a flexible database platform to meet custom needs
4. Automates database administration and other key activities
5. Provides continuous database monitoring along with advanced security
6. Offers high availability and flexibility to run critical applications and workloads
DBaaS is a case specific Platform as a Service (PaaS) cloud computing model that helps manage and store various databases without physical hardware. DBaaS platforms are usually shared and consolidated.
Below are some of the common DBaaS offerings:
1. Provisioning: Automating, scheduling, repeating, and unextending software or application deployment across locations, environments, and platforms
2. Configuring: Creating and defining database configuration parameters such as buffer pool size, database code page, backup pending flag, and so on
3. Scaling: Scaling, supporting, and storing larger amounts of data without sacrificing performance
4. Patch: Fixing bugs to improve system performance
5. Version upgrade: Upgrading the database with recommendations and configuring it for release
6. Backup configuration: Extracting configuration setting and writing them for backup
7. Data migration: Transferring data from a storage system or an environment to another
8. Database performance improvement:
Optimizing database performance by defragmenting data, improving indexes, increasing memory, reviewing access, and strengthening the central processing unit (CPU).
9. Data modeling: Representing complex data flow using an easy to understand diagram
10. Data encryption: Converting data into meaningful hypertexts with algorithms.
11. Access control: Restricting access to a database based in roles and discretion
v Popular NoSQL Databases:
1. MongoDB:
MongoDB is one of the most widely known document based databases that is capable of storing documents within JSON objects.
2. Cassandra:
Cassandra is a popular distributed, open-source database system that was initially built by Facebook that is widely available and quite scalable. It can easily handle petabytes of data and thousands of concurrent requests per second.
3. ElasticSearch:
ElasticSearch is another distributed, open source NoSQL database system that is highly consistent and scalable. It is also known as Analytics Engine to its users. You can easily leverage it to store, analyze, and search huge volumes of data.
4. Amaxon DynamoDB:
This is highly scalable, key-value pair distributed database system developed by Amazon. It can easily tackle 10 trillion requests per data and more than 700 companies are leveraging Amazon DynamoDB as a part of
their tech stack including Snapchat and Samsung.
5. HBase:
HBase is another open-source, highly scalable distributed database system in this list. HBase was penned in java and runs on the top of the Hadoop Distributed File System (HDFS).
Hey! This is my first visit to your blog! We are a collection of volunteers and starting a new project in a community in the same niche. Your blog provided us beneficial information to work on. You have done a wonderful job!
Thank you
Thank you for your appreciation..