Module 3
Module 3
Credits : 04
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
10 Hours
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Introduction
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Introduction
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Introduction
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Introduction
Demerits
1. Issues in troubleshooting in a larger networking infrastructure
2. Additional software requirements
3. Security risks for data and resources
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Introduction
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Introduction
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Introduction
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Triggers, Views and Schedules in SQL Databases
• Trigger is a special stored procedure
• Executes when specific action/s occurs within DB, like change in table data
or actions like UPDATE, INSERT and DELETE
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Triggers, Views and Schedules in SQL Databases
• Views refers to logical construct, used in query statements or
• A view is a virtual or logical table that allows to view or manipulate
parts of the tables.
• A view saves a division of complex query instructions and
reduces query complexity
CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition;
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Triggers, Views and Schedules in SQL Databases
• Chronological sequence of instructions which executes concurrently
• When a transaction in schedule, then all instructions of the transaction
are included in the schedule
• Enables execution of multiple transactions in allotted time intervals
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Join in SQL Databases
• SQL DBs facilitate combining rows from two or more tables
based on related columns
• By using JOIN function during database transaction
SELECT KitKatSales
FROM TransactionTb1 INNER JOIN ACVMSalesTb1
ON TransactionsTab1. KitKatSales = ACVMSalesTb1. KitKatSales ;
• There are scalability and distributed design issues
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
SQL compliant format means
• Database tables constructed using SQL and they enable processing
queries written using SQL
NoSQL term coveys two different meanings
1. Does not follow SQL compliant formats
2. Not Only SQL use SQL compliant formats with variety of other
querying and access methods
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
New category of Data store is NoSQL, offers many features
• Schema flexibility
• Simple relationships
• Dynamic schemas
• Auto sharding
• Replication
• Integrated caching
• Horizontal scalability of shards
• Distributable tuples
• Semi-structures data and flexibility in approach
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Issues
• Lack of standardization in approaches
• Processing difficulties for complex queries
• Depends on eventually consistent results in place of consistency in all
states
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Big-Data NoSQL
• NoSQL DB does not require specialized storage and HW for processing
• Storage can be on cloud
• NoSQL records are in non-relational data store systems
• They use flexible data models
• The records use multiple schemas
• NoSQL data store are considered as semi-structured data
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
NoSQL Data Store characteristics
1. NoSQL is a class of non-relational data storage system with flexible
data model
Example: Key-value pairs
Name-value pairs
Column family big data store
Tabular data store
Cassandra (used in Facebook/Apache)
HBase
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
NoSQL Data Store characteristics
Example: Hash table [Dynamo (Amazon S3)]
Unordered keys using JSON (CouchDB)
JSON (PNUTS)
JSON (MongoDB)
Graph Store
Object Store
Ordered keys
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
NoSQL Data Store characteristics
2. NoSQL does not has fixed schema, such as table
Do not use concept of joins
Data written at one node can be replicated at multiple nodes
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Features in NoSQL Transactions
1. Relax one or more ACID properties
2. Characterize by two out of three properties of CAP theorem
Two are at least present for the Application/Service/Process
3. Can be characterized by BASE properties
Consistency: All copies have the same values
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
CAP theorem
Consistency: All copies have the same values or
All nodes observe same data at same time
Therefore, operations in one partition of the DB should reflects in other
related partitions in case of distributed DB.
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
CAP theorem
Availability: At least one copy is available in case a partition become
inactive or fails
Replication ensures availability
Network failure leads to unavailability
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
CAP theorem
Partitions: Division of large database into different databases without
affecting operations on them by adapting specific procedures
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Brewer’s Consistency Availability and Partition Tolerance
CAP theorem demonstrates that any distributed system cannot guarantee
C, A and P together
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Big-Data NoSQL Solutions
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Big-Data NoSQL Solutions
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Big-Data NoSQL Solutions
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Schema-less Models
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Characteristics of schema-less Models
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Increasing flexibility for Data Manipulation: BASE properties
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store Example: Student Database in NoSQL
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
NoSQL Data Architecture Patterns
• Key-Value Store: High performance, Scalable and flexible
Data retrieval is fast in key-value store
- A Simple string called, key maps to large data string or BLOB
- Key-value store accesses use a primary key for accessing the values
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Advantages of Key-Value store
1. Any data type in the value field. Store Information BLOB of data
like text, hypertext, images, audio and video
2. Query just request the values and returns the values as single item,
values can be of any data type.
3. Key-value store is eventually consistent
4. May be hierarchical or may be ordered key-value store
5.Returned values can be used to convert into lists, table columns, data-
frame fields
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Advantages of Key-Value store
6.Scalable, Reliable, portable and low operational cost
7. Key can be synthetic or auto generated. Also flexible and in many format
i) Artificially generated strings created from hash of a value
ii) Logical path names to images or files
iii) REST web service calls (request response cycles)
iv) SQL queries
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Limitations
i) No indexes are maintained on values, thus a subset of values is not
searchable
ii) Key-value store does not provide traditional DB capabilities, such as
atomicity, consistency
iii) Maintaining unique values as keys may become more difficult when
the volume of data increases
iv) Queries cannot be performed on individual values. No clause like
where in a relational DB usable that filters a result set.
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Key-Value store provides client to read and write values using key as
follows
i) Get(key) returns value associated with key
ii) Put(key,value) associates value with key and updates a value if key
exists
iii) Multi-get(key1,key2,…,keyN) returns the list of values associated with
list of keys
iv) Delete(key) removes key and its value from data store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Key-Value: Riak
• Open source Erlang language data store
• It is a key-value data store system
• Data auto-distributes and replicates in Riak
Amazon’s DynamoDB, Redis, Memcached and its flavors,
Berkely DB, upscaledb, Project Voldemort and Couchbase.
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Document Store: Characteristics
• High performance
• Flexible
• Scalability varies, depends on stored contents
• Complexity is low compared to tabular, object and graph data stores
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Document Store: Features
1. Stores unstructured data
2. Storage has similarity with object store
3. Data stores in nested hierarchies
Ex: JSON, XML DOM, BLOB, Document tree
4. Querying is easy
Ex: Section number, sub section number, figure caption, table headings
are used to retrieve document partitions
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
XML Document Architecture Pattern and Discovering Hierarchical Structure
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Document Architecture Pattern and Discovering Hierarchical Structure
- Xpath and Xquery query languages for finding and extracting elements
and attributes of documents
- Xpath treats XML document as a tree of nodes
- Xpath queries are expressed in the form of Xpath expressions
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Document Architecture Pattern and Discovering Hierarchical Structure
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Tabular Data Store : Characteristics of Column-Family Data Store
- Querying all field values: in column, column-family,
column-family group
- Replication of column: default replication factor=3
- No optimization for join: Similar to sparse matrix
Uses
i) Web crawling ii) Large sparsely populated tables
iii) System that has high variance
Example :Googles BigTable
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Graph Database
- Series of interconnected nodes
G = (E,V)
- Edges encode relationship between nodes
- Complexity is high
- Performance is variable with scalability
- Enables fast network search
- Linked data sets, like social media data
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Graph Database
- Querying for data uses Graph traversal along the paths
- Traversal may be single step, path expression or recursion
Characteristics
1. Use special query language (RDF uses SPARQL)
2. Can have hyper edge.
3. Relationship between node is consistent in Graph store
4. Have poor scalability
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Graph Database
Uses
- Link analysis
- Friend of friend queries
- Rules and inference
- Rule induction
- Pattern matching
Ex: Neo4j, AllegroGraph, HyperGraph, Infinte Graph, Titan and FlockDB
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL Data Store
Steps for selecting pattern
1. Select an architecture
2. Perform difficulty analysis for each six patterns
Difficulties may be low, medium or high in following processes
i) Ingestion ii)Validation of structure and fields
iii) Updating process using batch or record by record approach
iv) Searching process is using full text or by changing sorting order
v) Export results in HTML, XML or JSON
3. Estimate total efforts for each pattern required
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL to Manage Big Data
NoSQL solutions for Big Data and Characteristics
1. High and easy scalability horizontally
2. Support to replication
3. Distributable
4. Usage less expensive servers
5. Usage of open source tools
6. Support schema less model
7. Support integrated caching
8. Flexible
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL to Manage Big Data
Types of Big Data problems
Problems arise due to limitations of NoSQL
1. Solutions must drop support for Database join
2. Open source tools may not have standards
- No stored procedure in MongoDB
- GUI mode tools not available in market
- Some scarify ACID compliancy
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
NoSQL to Manage Big Data
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Shared Nothing Architecture
- Big Data store consists SN architecture
- Node does not share data with other node
- So easily shards can be created
- Partition processes different queries on data of different users at each
node independently
- A coordination protocol controls the processing at all SN nodes.
- An SN architecture optimizes massive parallel data processing
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Shared Nothing Architecture
Features
- Independence: No memory sharing, possesses computational
self-sufficiency
- Self healing: Link failure causes creation of another link
- Each node functioning as shard: Each node stores a partition
- No network contention
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Shared Nothing Architecture
Choosing Distribution model: 1.Single Server Model
- Simplest, suits well for Graph DB
- Also used by key-value, column-family, BigTable
- An application executes data sequentially in Single server
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Shared Nothing Architecture
Choosing Distribution model: 2.Sharding very large Database
- Application process runs on multiple shards in parallel
- Performance improved
- In case a link failure, migrate the shard DB to
another node
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Shared Nothing Architecture
Choosing Distribution model: 3.Master Slave Distribution Model
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Shared Nothing Architecture
Choosing Distribution model: 4.Peer-to-peer (Cassandra)
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Shared Nothing Architecture
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Ways of handling Big Data Problems
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB DataBase
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB DataBase
1. Open source
2. Non-relational
3. NoSQL
4. Distributed
6. Cross platform
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB DataBase
7. Scalable
9. Indexed
10. Multi-master
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Typical applications
• Content management and delivery system
• Mobile Applications
• User Data management
• Gaming
• E-Commerce
• Analytics
• Archiving and logging
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Features
1. Physical container for collections: Each DB get its own
set of files on the file system. Number of DBs can run on
single MongoDB Server.
DB server in MongoDB is mongod and client is mongo
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Features
3. Document Model: Document is unit of data in MongoDB
Uses JSON to store data in documents
JSON data basically has key-value pairs
Have dynamic schema
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Features
7. Querying, Indexing and real time aggregation :
allows accessing and analyzing data efficiently
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Features
11.Indexes on any field in collection of documents:
support queries and operations
12. Atomic operations on single document
13.Fast in place updates: does not allocate new memory and write full
new copy of the object when update required
14. No configurable cache: Uses all free available memory
15. Conversion/mapping: application objects to data store objects not
needed
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Replication in MongoDB
- MongoDB replicates with help of replica set
- Replica set is group of mongod processes that store same dataset
- Replica set has has minimum 3 nodes
- Any one out of them called primary, remaining are secondary
- Primary node receives write operations
- Data replicates from primary to secondary
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB Data types which MongoDB documents supports
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB Data types which MongoDB documents supports
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB Features of MongoDB wrt RDBMS
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB MongoDB Query Commands
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB MongoDB Query Commands
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB: Sample usage of Commands
To create Database
use DATABASE >use tata
To check your currently selected database
db >db
To check your databases list
show dbs >show dbs
To drop a database
db.dropDatabase()
>use tata
>db.dropDatabase()
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB: Sample usage of Commands
To create a collection
>db.COLLECTION_NAME.insert(document)
db.tata.insert({
"type": "car",
"model": "2018",
“name": “Nexon",
})
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB: Sample usage of Commands
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
MongoDB: Sample usage of Commands
To view all collection document
db.COLLECTION_NAME.find()
>db.tata.find()
To update a document
db.COLLECTION_NAME.update(SELECTION_CRITERIA, UPDATED_DATA)
db.tata.update({‘model':2020'}, {$set:{‘name':Harrier'}},{multi:true})
To delete a document
db.COLLECTION_NAME.remove(DELLETION_CRITTERIA)
db.tata.remove((“model”:2020))
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Characteristics
- Open source
- Scalable
- Non-relational
- NoSQL
- Distributed
- Column based
- Decentralized
- Fault tolerant
- Tuneable Consistency
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Features
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Features
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Components
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Components
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Features
Scalability:
- Provides linear scalability which increases the throughput
- Decreases response time on increase in number of nodes at cluster
Transaction Support:
- Supports ACID properties
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Features
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Data Types
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Data Types
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Data Types
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
ANY : A write must be written to commitlog and memtable of at least one node
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
LOCAL_ONE : A write must be written for at least one replica node in the local
data center
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Keyspaces
CassandraDB: Keyspaces
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
CassandraDB: Keyspaces
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga
NoSQL Big Data Management, MongoDB and Cassandra
Arun Kumar P
Dept. of ISE, JNNCE, Shivamogga