Basics of NoSQL, Mongo DB
Basics of NoSQL, Mongo DB
MongoDB
Introduction
• Till now we have been working on the databases
which were based on SQL consisting of table, row,
fields ,records etc.
• It is possibe to have database without any structure or
record. NoSQL or Not Only SQL Databases are such
databases.
• We will learn NoSQL databases in this chapter.
NoSQL Databases
• These are non-relational databases which does not have any strict or
rigid structure.
• These does not store records on the basis of conventional tables.
• These runs in clusters and stores data on the basis of web. These are
high in scalability. These are also known as bigdata.
• You have worked on several apps/web apps using such databases
like Google Mail, Google Earth, Ebay, LinkedIn, facebook, Amazon
etc.
• These provides fast response time.
• These can handle data of any kind without any restriction.
• These adopts new features and fast update.
• These does not show down time.
Key-Value databases
• Just like python dictionary.
• Very simple and flexible.
• Examples-Cassandra, Amazon DyanmoDB,
ATS (Azure Table Storage, Riak, BerkeleyDB
MongoDB Terminology
MongoDB Term Description SQL Term
Field a name-value pair which stores information. Column
Document Group of Locally related fields. Row/record
Collection Group of Related documents. Table
Database A container for Collections. A MongoDB server can Database
have multiple databses.
Primary key Unique field identifies document. Primary key
Download msi
version from
here
It is required to have mogodb in running state before running Mongo. Now, you
are ready to give commmand on mongo.
Here, 2 documents
are inserted.
With the above given example only name field will be displayed with “_id”.
$eq Equal to
“Hari
Prakash” record is
deleted.
www.pythontrends.wordpress.com