"Not Only SQL" generally known as NoSQL is a database system that provides simple lightweight mechanism for storage and retrieval of data. NoSQL has become much popular in the last few years. The database arose alongside major Internet companies such as Google, Yahoo, Facebook and Amazon because all these companies has to deal with a large amount of data and when a relational database grows out of one server, it is no longer that easy to use. In other words, they don't scale out very well in a distributed system. So all these big sites store the data in distributed systems for several reasons. It could be that the data doesn't fit on one server, or there are requirements for high availability.
Some advantages of NoSQL databases are:
- They don't have a fixed schema as traditional RDMS have.
- They don't write normal SQL statements against the database, but instead use an API to get the data they need.
- The NoSQL databases can usually scale across different physical servers easily without needing to know which server the data you are looking for is on.
- Highly optimized for retrieval and appending operations and often offer little functionality beyond record storage.
- NoSQL has a distributed, fault-tolerant architecture
- The NoSQL data stores use looser consistency models to achieve horizontal scaling and higher availability.
NoSQL databases are categorized mainly into four according to the way they store the data as Key/value stores databases, Bigtable inspired databases, Document store databases
and Graph databases.
The central concept of a document store is the notion of a document. While each document-oriented database implementation differs, in general, they all assume that documents encapsulate and encode data in some standard formats or encodings.
Graph database is designed for data whose relations are well represented as a graph (elements interconnected with an undetermined number of relations between them). The kind of data could be social relations, public transport links, road maps or network topologies.
Key–value stores allow the application to store its data in a schema-less way. The data could be stored in a datatype of a programming language or an object. Because of this, there is no need for a fixed data mode.
This blog post also covers some basics of a NoSQL database MongoDB.
MongoDB is an open-source, document-oriented database designed for ease of
development and scaling.The main features of MongoDb are flexibility, power, speed, and
ease of use. A MongoDB deployment hosts a number of databases. A database holds a set of collections. A collection holds a set of documents. A document is a set of key-value pairs. Although MongoDB supports a “standalone” or single-instance operation, production MongoDB deployments are distributed by default. Replica sets provide high performance replication with automated failover, while sharded clusters make it possible to partition large data sets over many machines transparently to the users.
The database can be installed in your system following the instructions. The blog hereafter covers some basics of MongoDB. After we have successfully installed the database, mongo can be started by typing mongo in the command prompt. Some commands used in the MonoDB operations are given below:
db - After starting the mongo shell your session will use the test database for context, by default. At any time issue the above operation at the mongo to report the current database.
show dbs - Display the list of databases from the mongo shell.
use mydb - Switch to a new database named mydb.
help - At any point you can access help for the mango shell using thisoperation.
db.things.insert()- Insert documents into the collection things.When you insert the first document, the mangod will create both the database and the things collection.
show collections - Displays the available collections in the database.
db.things.find() - Finds the documents in the collection. The documents to be found can be specified through arguments of the find function. The cursor of the MongoDB displays only the first 20 output documents. it command is used to display the rest of the documents.
These are some basic commands used in MongoDB. For further details please refer here.
and Graph databases.
The central concept of a document store is the notion of a document. While each document-oriented database implementation differs, in general, they all assume that documents encapsulate and encode data in some standard formats or encodings.
Graph database is designed for data whose relations are well represented as a graph (elements interconnected with an undetermined number of relations between them). The kind of data could be social relations, public transport links, road maps or network topologies.
Key–value stores allow the application to store its data in a schema-less way. The data could be stored in a datatype of a programming language or an object. Because of this, there is no need for a fixed data mode.
This blog post also covers some basics of a NoSQL database MongoDB.
MongoDB is an open-source, document-oriented database designed for ease of
development and scaling.The main features of MongoDb are flexibility, power, speed, and
ease of use. A MongoDB deployment hosts a number of databases. A database holds a set of collections. A collection holds a set of documents. A document is a set of key-value pairs. Although MongoDB supports a “standalone” or single-instance operation, production MongoDB deployments are distributed by default. Replica sets provide high performance replication with automated failover, while sharded clusters make it possible to partition large data sets over many machines transparently to the users.
The database can be installed in your system following the instructions. The blog hereafter covers some basics of MongoDB. After we have successfully installed the database, mongo can be started by typing mongo in the command prompt. Some commands used in the MonoDB operations are given below:
db - After starting the mongo shell your session will use the test database for context, by default. At any time issue the above operation at the mongo to report the current database.
show dbs - Display the list of databases from the mongo shell.
use mydb - Switch to a new database named mydb.
help - At any point you can access help for the mango shell using thisoperation.
db.things.insert()- Insert documents into the collection things.When you insert the first document, the mangod will create both the database and the things collection.
show collections - Displays the available collections in the database.
db.things.find() - Finds the documents in the collection. The documents to be found can be specified through arguments of the find function. The cursor of the MongoDB displays only the first 20 output documents. it command is used to display the rest of the documents.
These are some basic commands used in MongoDB. For further details please refer here.
Comments
Post a Comment