Unit-05 SSB DBMS
Unit-05 SSB DBMS
Unit-05 SSB DBMS
Unit: 5
Introduction To NOSQL with Cloud Database
LTP Credits
3–1–0 4
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1 2 2 3 2 3 3 - 1 - 2 2 3
CO2 2 2 2 2 2 2 - 1 - 1 2 2
CO3 2 2 3 2 3 2 - 2 - 1 2 3
CO4 3 3 3 3 3 2 - 2 - 2 1 3
CO5 3 2 2 2 3 2 - 2 1 3 3 3
Average 2.4 2.2 2.6 2.2 2.8 2.2 - 1.6 1 1.8 2 2.8
SECTION – B CO
3. Answer any five of the following- [5×6=30]
3-a. Question- (6)
3-b. Question- (6)
3-c. Question- (6)
3-d. Question- (6)
3-e. Question- (6)
3-f. Question- (6)
3-g. Question- (6)
SECTION – C CO
4 Answer any one of the following- [5×10=50]
Prerequisites:
• Linux/ Windows operating system.
• Database Management Software's such as Oracle
• Knowledge on SQL/PLSQL.
• Cloud Infrastructure.
• Handling Big Data on Unstructured Databases.
• Programming Languages (Python or Java)
Recap:
• Discussion about Cloud and Database Management System.
The rise of NoSQL is an important event in computer science and in application development because
SQL has been so dominant for so long. Many other forms of database technology have come and
gone, but few have had the wide adoption of NoSQL.
By understanding the rise in popularity of NoSQL databases, we should be able to shed light on when
it makes sense to use NoSQL.
NoSQL covers a lot of different database structures and data models.
• http://www.nptelvideos.com/lecture.php?id=6516
• http://www.nptelvideos.com/lecture.php?id=6517
• http://www.nptelvideos.com/lecture.php?id=6518
• http://www.nptelvideos.com/lecture.php?id=6519
• https://www.youtube.com/watch?v=2yQ9TGFpDuM
Objective:
In this topic we focus on There are several advantages of working
with NoSQL databases such as MongoDB and Cassandra. The main
advantages are high scalability and high availability. High scalability:
NoSQL database such as MongoDB uses sharding for horizontal
scaling.
Recap:
Revision of Database Management Systems.
NoSQL databases (aka "not only SQL") are non-tabular databases and store data differently
than relational tables. NoSQL databases come 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 loads.
When people use the term “NoSQL database,” they typically use it to refer to any non-
relational database. Some say the term “NoSQL” stands for “non SQL” while others say it
stands for “not only SQL.” Either way, most agree that NoSQL databases are databases that
store data in a format other than relational tables.
Introduction NoSQL
1. Stands for Not Only SQL.
2. The idea of NoSQL founded in 1998 with term lightweight
Schema Less by Carlo Strozzi.
3. Open-source database.
4. NoSQL will be the future database.
5. Very compatible with distributed systems.
6. Lower cost.
7. High performance database.
8. Founded to handle huge data space.
9. Used by Facebook , Google , Wikipedia …
1. Basically Available.
3. Eventually Consistent.
4. Weak consistency.
5. Availability first.
Document Store.
JSON,XML … document structured.
No Join.(handle it in your code).
Column Database.
Each storage block contains data from only one column.
Reduce access and scanning time.
Still use tables without joins statements.
Better for data analytics.
Query Analysis
Objective:
In this topic we focus on Motivations for this approach include
simplicity of design, simpler "horizontal" scaling to clusters of
machines (which is a problem for relational databases), finer control
over availability and limiting the object-relational impedance
mismatch.
Recap:
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
databases gave them this flexibility.
Cloud computing also rose in popularity, and developers began using public clouds to host
their applications and data. They wanted the ability to distribute data across multiple
servers and regions to make their applications resilient, to scale out instead of scale up, and
to intelligently geo-place their data. Some NoSQL databases like MongoDB provide these
capabilities.
• Flexible schemas
• Horizontal scaling
• Fast queries due to the data model
• Ease of use for developers
Benefits of NoSQL Databases
NoSQL databases offer many benefits over relational databases. NoSQL databases have
flexible data models, scale horizontally, have incredibly fast queries, and are easy for
developers to work with.
NoSQL databases typically have very flexible schemas. A flexible schema allows you to
easily make changes to your database as requirements change. You can iterate quickly
and continuously integrate new application features to provide value to your users faster.
2. Horizontal scaling
Most SQL databases require you to scale-up vertically (migrate to a larger, more expensive
server) when you exceed the capacity requirements of your current server. Conversely,
most NoSQL databases allow you to scale-out horizontally, meaning you can add cheaper,
commodity servers whenever you need to.
3. Fast queries
Queries in NoSQL databases can be faster than SQL databases. Why? Data in SQL databases
is typically normalized, so queries for a single object or entity require you to join data from
multiple tables. As your tables grow in size, the joins can become expensive. However, data
in NoSQL databases is typically stored in a way that is optimized for queries. The rule of
thumb when you use MongoDB is Data that is accessed together should be stored together.
Queries typically do not require joins, so the queries are very fast.
To address these use cases MongoDB added support for multi-document ACID transactions
in the 4.0 release, and extended them in 4.2 to span sharded clusters.
Since data models in NoSQL databases are typically optimized for queries and not for
reducing data duplication, NoSQL databases can be larger than SQL databases. Storage is
currently so cheap that most consider this a minor drawback, and some NoSQL databases
also support compression to reduce the storage footprint.
Depending on the NoSQL database type you select, you may not be able to achieve all of
your use cases in a single database. For example, graph databases are excellent for analyzing
relationships in your data but may not provide what you need for everyday retrieval of the
data such as range queries. When selecting a NoSQL database, consider what your use cases
will be and if a general purpose database like MongoDB would be a better option.
12/05/2022 Mr. SOVERS SINGH BISHT UNIT 05 36
THE
History CONCEPT
of NoSQL LEARNING
and Different NoSQLTASK
products
• Document databases
• Key-value stores
• Column-oriented databases
• Graph databases
Document Databases
A document database stores data in JSON, BSON , or XML documents (not Word documents
or Google docs, of course). In a document database, documents can be nested. Particular
elements can be indexed for faster querying.
Documents can be stored and retrieved in a form that is much closer to the data objects
used in applications, which means less translation is required to use the data in an
application. SQL data must often be assembled and disassembled when moving back and
forth between applications and storage.
Document databases are popular with developers because they have the flexibility to
rework their document structures as needed to suit their application, shaping their data
structures as their application requirements change over time. This flexibility speeds
development because in effect data becomes like code and is under the control of
developers. In SQL databases, intervention by database administrators may be required to
change the structure of a database.
The most widely adopted document databases are usually implemented with a scale-out
architecture, providing a clear path to scalability of both data volumes and traffic.
Use cases include ecommerce platforms, trading platforms, and mobile app development
across industries.
Key-Value Stores
The simplest type of NoSQL database is a key-value store . Every data element in the
database is stored as a key value pair consisting of an attribute name (or "key") and a
value. In a sense, a key-value store is like a relational database with only two columns:
the key or attribute name (such as state) and the value (such as Alaska).
Use cases include shopping carts, user preferences, and user profiles.
Column-Oriented Databases
While a relational database stores data in rows and reads data row by row, a column store
is organized as a set of columns. This means that when you want to run analytics on a
small number of columns, you can read those columns directly without consuming
memory with the unwanted data. Columns are often of the same type and benefit from
more efficient compression, making reads even faster. Columnar databases can quickly
aggregate the value of a given column (adding up the total sales for the year, for example).
Use cases include analytics.
Unfortunately, there is no free lunch, which means that while columnar databases are
great for analytics, the way in which they write data makes it very difficult for them to be
strongly consistent as writes of all the columns require multiple write events on disk.
Relational databases don't suffer from this problem as row data is written contiguously to
disk.
Graph Databases
A graph database focuses on the relationship between data elements. Each element is
stored as a node (such as a person in a social media graph). The connections between
elements are called links or relationships. In a graph database, connections are first-class
elements of the database, stored directly. In relational databases, links are implied, using
data to express the relationships.
A graph database is optimized to capture and search the connections between data
elements, overcoming the overhead associated with JOINing multiple tables in SQL.
Very few real-world business systems can survive solely on graph queries. As a result graph
databases are usually run alongside other more traditional databases.
Use cases include fraud detection, social networks, and knowledge graphs.
As you can see, despite a common umbrella, NoSQL databases are diverse in their data
structures and their applications.
Objective:
In this topic we focus on MongoDB which is a source-available cross-
platform document-oriented database program. Classified as a
NoSQL database program, MongoDB uses JSON-like documents with
optional schemas. MongoDB is developed by MongoDB Inc. and
licensed under the Server Side Public License.
Recap:
About MongoDB
• MongoDB is an open-source document database and leading NoSQL
database. MongoDB is written in C++.
• This study will give you great understanding on MongoDB concepts
needed to create and deploy a highly scalable and performance-
oriented database.
MongoDB
• MongoDB is a cross-platform, document oriented database that provides, high
performance, high availability, and easy scalability. MongoDB works on concept of
collection and document.
• Database
• Database is a physical container for collections. Each database gets its own set of files
on the file system. A single MongoDB server typically has multiple databases.
• Collection
• Collection is a group of MongoDB documents. It is the equivalent of an RDBMS table. A
collection exists within a single database. Collections do not enforce a schema.
Documents within a collection can have different fields. Typically, all documents in a
collection are of similar or related purpose.
• Document
• A document is a set of key-value pairs. Documents have dynamic schema. Dynamic
schema means that documents in the same collection do not need to have the same
set of fields or structure, and common fields in a collection's documents may hold
different types of data.
• The following table shows the relationship of RDBMS terminology with MongoDB.
12/05/2022 Mr. SOVERS SINGH BISHT UNIT 05 44
THE CONCEPT
NoSQL Databases: LEARNING
Introduction to NoSQLTASK
& MongoDB
RDBMS MongoDB
Database Database
Table Collection
Tuple/Row Document
column Field
Mysqld/Oracle mongod
mysql/sqlplus mongo
12/05/2022 Mr. SOVERS SINGH BISHT UNIT 05 45
THE CONCEPT
IntroductionLEARNING
MongoDB TASK
MongoDB: Goal
• Goal: bridge the gap between key-value stores (which are fast and scalable) and
relational databases (which have rich functionality).
What is MongoDB?
• Document-Oriented DB
– Unit object is a document instead of a row (tuple) in relational DBs
Is It Fast?
NoSQL: Categories
Objective:
In this topic we focus on introducing the essential ways of
interacting with NoSQL data stores. The types of NoSQL stores vary
and so do the ways of accessing and interacting with them. This
topic attempts to summarize a few of the most prominent of these
disparate ways of accessing and querying data in NoSQL databases.
Recap:
Objective:
In this topic we focus on MongoDB - Datatypes
1. String − This is the most commonly used datatype to store the data.
2. Integer − This type is used to store a numerical value. ...
Recap:
Revision of Nosql Databases.
• Field Value
– Scalar (Int, Boolean, String,
One document
Date, …)
– Document (Embedding or
Nesting)
Another Example
Remember it is stored in
binary formats (BSON)
MongoDB Model
Example Document in
MongoDB
• Or:
• 1st 4 bytes timestamp
• Next 3 bytes machine id
• Next 2 bytes Process id
• Last 3 bytes incremental values
Objective:
In this topic we focus on the NoSQL database approach which is
characterized by a move away from the complexity of SQL based
servers. The logic of validation, access control, mapping querieable
indexed data, correlating related data, conflict resolution,
maintaining integrity constraints, and triggered procedures is moved
out of the database layer.
Recap:
Revision of RDBMS architecture.
• Advantages:
• Can handle large amounts of data and heavy load,
• Easy retrieval of data by keys.
• Limitations:
• Complex queries may attempt to involve multiple key-value pairs which may delay performance.
• Data can be involving many-to-many relationships which may collide.
• Examples:
• DynamoDB
• Berkeley DB
• Advantages:
• HBase
• Bigtable by Google
• Cassandra
• 3. Document Database:
• The document database fetches and accumulates data in form of key-value pairs
but here, the values are called as Documents. Document can be stated as a complex
data structure. Document here can be a form of text, arrays, strings, JSON, XML or
any such format. The use of nested documents is also very common. It is very
effective as most of the data created is usually in form of JSONs and is unstructured.
• Advantages:
• This type of format is very useful and apt for semi-structured data.
• Storage retrieval and managing of documents is easy.
• Limitations:
• Handling multiple documents is challenging
• Aggregation operations may not work accurately.
• Examples:
• MongoDB
• CouchDB
Objective:
In this topic we focus on CRUD Meaning: CRUD is an acronym that
comes from the world of computer programming and refers to the
four functions that are considered necessary to implement a
persistent storage application: create, read, update and delete.
Recap:
Revision of Database Management Systems.
Must Practice It
Manual: http://docs.mongodb.org/master/MongoDB-manual.pdf
(Focus on Ch. 3, 4 for now)
Dataset: http://docs.mongodb.org/manual/reference/bios-example-collection/
CRUD
• Create
– db.collection.insert( <document> )
– db.collection.save( <document> )
– db.collection.update( <query>, <update>, { upsert: true } )
• Read
– db.collection.find( <query>, <projection> )
– db.collection.findOne( <query>, <projection> )
• Update
– db.collection.update( <query>, <update>, <options> )
• Delete
– db.collection.remove( <query>, <justOne> )
CRUD Examples
Objective:
In this topic we focus on Most NoSQL and NewSQL data stores
which implement some sort of horizontal partitioning or sharding,
which involves storing sets or rows/records into different segments
(or shards) which may be located on different servers.
Recap:
Revision of Database Management Systems.
Examples
In RDBMS In MongoDB
Either insert the 1st docuement
• You can put condition on any field in the document (even _id)
Equivalent to in SQL:
Two
operators
Query Condition
New
doc
For the document having item = “BE10”, replace it with the given document
Objective:
In this topic we focus on MongoDB uses multikey indexes to index
the content stored in arrays. When you index on a column that holds
an array value, MongoDB creates separate index entries for every
element of the array. These multikey indexes allow queries to select
documents that contain arrays by matching on element or elements
of the arrays.
Recap:
Revision of DBMS architecture.
• Indexes support the efficient resolution of queries. Without indexes, MongoDB must scan
every document of a collection to select those documents that match the query
statement. This scan is highly inefficient and require MongoDB to process a large volume
of data.
• Indexes are special data structures, that store a small portion of the data set in an easy-to-
traverse form. The index stores the value of a specific field or set of fields, ordered by the
value of the field as specified in the index.
• Syntax
• The basic syntax of createIndex() method is as follows().
• >db.COLLECTION_NAME.createIndex({KEY:1})
• Here key is the name of the field on which you want to create index and 1 is for ascending
order. To create index in descending order you need to use -1.
12/05/2022 Mr. SOVERS SINGH BISHT UNIT 05 94
THE and
Indexing CONCEPT
orderingLEARNING TASK
datasets (MongoDB)
• Example
• >db.mycol.createIndex({"title":1})
• {
• "createdCollectionAutomatically" : false,
• "numIndexesBefore" : 1,
• "numIndexesAfter" : 2,
• "ok" : 1
• }
• >
• In createIndex() method you can pass multiple fields, to create index
on multiple fields.
• >db.mycol.createIndex({"title":1,"description":-1})
• >
12/05/2022 Mr. SOVERS SINGH BISHT UNIT 05 95
THE and
Indexing CONCEPT
orderingLEARNING TASK
datasets (MongoDB)
• > db.mycol.createIndex({"title":1,"description":-1})
Objective:
In this topic we focus on Capped collections are fixed-size collections
that support high-throughput operations that insert and retrieve
documents based on insertion order.
Recap:
Revision of NOSql architecture.
• Store log information generated by high-volume systems. Inserting documents in a capped collection
without an index is close to the speed of writing log information directly to a file system. Furthermore,
the built-in first-in-first-out property maintains the order of events, while managing storage use.
• Cache small amounts of data in a capped collections. Since caches are read rather than write heavy,
you would either need to ensure that this collection always remains in the working set (i.e. in RAM) or
12/05/2022 Mr. SOVERS SINGH BISHT UNIT 05 100
accept some write penalty for the required index or indexes.
THE CONCEPT LEARNING TASK
Capped Collections
• _id Index
• Capped collections have an _id field and an index on the _id field by default.
• Document Size
• Changed in version 3.2.
• If an update or a replacement operation changes the document size, the operation will fail.
• Document Deletion
• You cannot delete documents from a capped collection. To remove all documents from a collection, use the drop() method to drop the
collection and recreate the capped collection.
• Sharding
• You cannot shard a capped collection.
• Query Efficiency
• Use natural ordering to retrieve the most recently inserted elements from the collection efficiently. This is similar to using the tail
command on a log file.
• Aggregation $out
• The aggregation pipeline stage $out cannot write results to a capped collection.
• Transactions
• Starting in MongoDB 4.2, you cannot write to capped collections in transactions. Reads from capped collections are still supported in
transactions.
12/05/2022 Mr. SOVERS SINGH BISHT UNIT 05 101
THE CONCEPT LEARNING TASK
Capped Collections
• Procedures
• Create a Capped Collection
• You must create capped collections explicitly using the db.createCollection() method,
which is a helper in the mongo shell for the create command. When creating a capped
collection you must specify the maximum size of the collection in bytes, which MongoDB
will pre-allocate for the collection. The size of the capped collection includes a small
amount of space for internal overhead.
• If the size field is less than or equal to 4096, then the collection will have a cap of 4096
bytes. Otherwise, MongoDB will raise the provided size to make it an integer multiple of
256.
• Additionally, you may also specify a maximum number of documents for the collection
using the max field as in the following document:
• To retrieve documents in reverse insertion order, issue find() along with the sort() method with the
$natural parameter set to -1, as shown in the following example:
• db.cappedCollection.find().sort( { $natural: -1 } )
• db.collection.isCapped()
• The size parameter specifies the size of the capped collection in bytes.
• This holds a database exclusive lock for the duration of the operation. Other
operations which lock the same database will be blocked until the operation
completes. See What locks are taken by some common client operations? for
operations that lock the database.
• Tailable Cursor
• You can use a tailable cursor with capped collections. Similar to the Unix tail -f
command, the tailable cursor "tails" the end of a capped collection. As new
documents are inserted into the capped collection, you can use the tailable cursor
to continue retrieving documents.
Objective:
In this topic we focus on cloud database which is a database service
built and accessed through a cloud platform. It serves many of the
same functions as a traditional database with the added flexibility of
cloud computing. Users install software on a cloud infrastructure to
implement the database.
Recap:
• Key features:
• Scalability
• Cloud databases can expand their storage capacities on run-time to accommodate
changing needs. Organizations only pay for what they use.
• Disaster recovery
• In the event of a natural disaster, equipment failure or power outage, data is kept
secure through backups on remote servers.
• Users can opt for a virtual machine image managed like a traditional database or a provider’s
database as a service (DBaaS).
• Database technology
• SQL databases are difficult to scale but very common. NoSQL databases scale more easily but do
not work with some applications.
• Security
• Most cloud database providers encrypt data and provide other security measures; organizations
should research their options.
• Maintenance
• When using a virtual machine image, one should ensure that IT staffers can maintain the underlying
infrastructure.
12/05/2022 Mr. SOVERS SINGH BISHT UNIT 05 108
THE CONCEPT
Cloud database: LEARNING
- Introduction of CloudTASK
database
• Platform as a service(PaaS)
• Software as a service(SaaS)
• Infrastructure as a service(IaaS)
• Platform as a service or PaaS is the most common type here, providing the provision of servers, data
storage, and operating systems. It helps in the storage and acts as a platform for the virtual
database, saving the hardware cost and helping to access the data from all around the world.
• SaaS, on the other hand, provides the entire software as a service to the organization in exchange for
an amount and is an excellent business option for all those organizations involving a lot of web users.
• IaaS helps to provide a complete infrastructure where the business can run their applications.
12/05/2022 Mr. SOVERS SINGH BISHT UNIT 05 109
THE CONCEPT
Cloud database: LEARNING
- Introduction of CloudTASK
database
• CLOUCloud computing is on a rise because of the flexibility and the ease of services that
it provides. Several well-known IT giants are planning to capture the market. Most of
the cloud databases run on the well-known cloud computing platforms like Rackspace,
salesforce, GoGrid, and Amazon EC2.
• Here are the top five most beneficial cloud services for data storage.
Objective:
In this topic we focus on NoSQL databases are specifically designed
for low cost commodity hardware. These databases are mostly used
for storage and access of data across multiple storage cluster. For
example Google, Facebook, Google+, Google big table, Amazon
Dynamo, Twitter etc. collects and stores Terabytes of data for their
user every day.
Recap:
Revision of Cloud Architecture.
Most of the time (and for most of the remainder of this page), the
term “cloud database” refers to a cloud-based database-as-a-service.
• Are cloud-native
• Data applications that take advantage of centralization, like legacy modernization and analytics, are also
fantastic candidates for cloud database usage.
• While certain use cases are more obvious candidates for cloud database usage, more traditional use cases, like
real-time online transaction processing, caching, or data warehousing work just as well in the fully managed
paradigm.
• Database Technology
• Management System
• Cost Model
• Security
• Extras
• Simplified management
• Elastic autoscaling
• Charts
• Connectors
• Schema navigator
• The way a cloud database works is that rather than installing, configuring, and
maintaining a database instance or instances, an automated system is able to
provision, manage, and scale the underlying database cluster for you.
• You can treat the cluster as a single database instance, covered by a transparent
usage-based pricing model, so you’re never worrying about over- or under-
provisioning.
Objective:
In this topic we focus on cloud database which is a database service
built and accessed through a cloud platform. It serves many of the
same functions as a traditional database with the added flexibility of
cloud computing. Users install software on a cloud infrastructure to
implement the database.
Recap:
v0
12/05/2022 d1BISHT
Mr. SOVERS SINGH dUNIT
2 05 t 122
THE CONCEPT
Introduction LEARNING
to Real TASK
time Database.
Deadlines
• Firm-Deadline:
– Desirable but not critical (like Soft-Deadline case)
– It is not executed after its deadline and no value is
gained by the system from the tasks that miss
their deadlines
v(t)
– Example: an autopilot systemFirm deadline
v0
d t
12/05/2022 Mr. SOVERS SINGH BISHT UNIT 05 123
THE CONCEPT
Introduction LEARNING
to Real TASK
time Database.
Deadlines
• Hard-Deadline:
– Timely and logically correct execution is
considered to be critical
– Missing a hard-deadline can result in catastrophic
consequences
– Also known as Safety-Critical
– Example:v(t)data gathered byHard
a sensor
deadline
v0
Tasks Periodicity
• Prosodic Tasks
– Executes at regular intervals of time
– Corresponds to TT architecture
– Have Hard-Deadlines characterized by their periods
(requires worst-case analysis).
• Aperiodic Tasks
– Execution time cannot be priori anticipated
– Activation of tasks is random event caused by a trigger
– Corresponds to ET architecture
– Have Soft-Deadlines (no worst-case analysis)
Tasks Periodicity
• Sporadic Tasks
• Tasks which are aperiodic in nature, but have Hard-
Deadlines
• Used to handle emergency conditions or exceptional
situations
• Worst-case calculations is done using Schedulability-
Constraint
• Schedulability-Constraint defines a minimum period
between any two sporadic events from the same
source.
12/05/2022 Mr. SOVERS SINGH BISHT UNIT 05 128
THE CONCEPT LEARNING TASK
Scheduling
• Each task within a real-time system has
– Deadline
– An arrival time
– Possibly an estimated worst-case execution
• A Scheduler can be defined as an algorithm or policy
for ordering the execution of the outstanding process
• Scheduler maybe:
– Preemptive
• Can arbitrarily suspend and resume the execution of the task
without affecting its behavior
Conventional Databases:
Transactions and Serializability
• Database inconsistencies can be caused by:
– Failures
– Concurrency
• Four properties associated with transactions
known as ACID properties are used to prevent
such problems
Conventional Databases:
ACID Properties
A Atomicity: Either all or none of the transactions operations are/is
performed. All the operations of a transaction are treated as a
single, indivisible, atomic unit.
• Real-time databases
• Data centric
– Data has temporal validity, i.e., deadlines also attached to
data
– Transactions must be executed by deadline to keep the data
valid, in addition to produce results in a timely manner
• Scheduler:
• Drop transaction (firm/soft)
• Replace transaction with contingency action (hard)
• Postpone transaction execution (soft)
Assignment
Q1: What are NoSQL databases? What are the different types of NoSQL databases?
Q3: Explain difference between scaling horizontally and vertically for databases
Q7: Does MongoDB support ACID transaction management and locking functionalities?
Q9: How can you achieve primary key - foreign key relationships in MongoDB?
http://www.nptelvideos.com/lecture.php?id=6516
http://www.nptelvideos.com/lecture.php?id=6517
http://www.nptelvideos.com/lecture.php?id=6518
http://www.nptelvideos.com/lecture.php?id=6519
https://www.youtube.com/watch?v=2yQ9TGFpDuM
• 1. Most NoSQL databases support automatic __________ meaning that you get high availability
and disaster recovery.
• (a)processing
• (b)scalability
• (c) replication
• (d)all of the mentioned
•
• 2. Which of the following are the simplest NoSQL databases?
• (a)Key-value
• (b)Wide-column
• (c) Document
• (d)All of the mentioned
• 3.________ stores are used to store information about networks, such as social connections.
• (a)Key-value
• (b)Wide-column
• (c) Document
• (d)Graph
• 8. NoSQL was designed with security in mind, so developers or security teams don't need to worry about
implementing a security layer. Is it true or false?
• (a)True
• (b)False
• 9. Which of the following is not a reason NoSQL has become a popular solution for some organizations?
• (a)Better scalability
• (b)Improved ability to keep data consistent
• (c) Faster access to data than relational database management systems (RDBMS)
• (d)More easily allows for data to be held across multiple servers
Thank You