0% found this document useful (0 votes)
16 views16 pages

NoSQL Database Techniques Overview

Uploaded by

sec22it109
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views16 pages

NoSQL Database Techniques Overview

Uploaded by

sec22it109
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CAT1 _QB_20ITEL609 / NoSQL Database Techniques

Course Outcome 1 (CO1)

UNIT 1 / Part - A / 1 Mark/ MCQ


Sl. Marks K–
Questions CO
No. Split-up Level
1. What does NoSQL stand for? 1

A) Not only SQL

B) Non-structured Query Language

C) New SQL

D) None of the above


Answer: A) Not only SQL

2. Which of the following is an example of a NoSQL database? 1

A) MySQL
B) MongoDB
C) PostgreSQL
D) Oracle
Answer: B) MongoDB

3. What type of NoSQL database is MongoDB? 1

A) Document-based
B) Column-family store
C) Key-value store
D) Graph-based
Answer: A) Document-based

4. Which of these databases is a key-value store? 1

A) MongoDB
B) Neo4j
C) Redis
D) Cassandra
Answer: C) Redis

5. Which NoSQL database uses a graph data model? 1

A) MongoDB
B) Cassandra
C) Neo4j
D) HBase
Answer: C) Neo4j

Page 1 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

Which of the following is a Column-family store in NoSQL 1


databases?

A) MySQL
B) MongoDB
C) Cassandra
D) Redis
Answer: C) Cassandra

7. Which of the following is an example of a relational database? 1

A) MongoDB
B) MySQL
C) Neo4j
D) HBase
Answer: B) MySQL

8. Which of the following is a type of NoSQL database? 1

A) Key-value stores
B) Relational databases
C) SQL databases
D) None of the above
Answer: A) Key-value stores

9. What is the main difference between NoSQL and relational 1


databases?

A) NoSQL uses SQL


B) NoSQL databases are schema-less
C) Relational databases are more flexible
D) NoSQL databases do not allow large datasets
Answer: B) NoSQL databases are schema-less

10. Which NoSQL database is commonly used for handling large- 1


scale graph data?

A) MongoDB
B) Neo4j
C) Cassandra
D) HBase
Answer: B) Neo4j

11. Which of these is a feature of a Column-family store in NoSQL 1


databases?

A) Stores data as documents


B) Stores data in rows and columns
C) Data is stored as key-value pairs
D) Data is stored as graphs
Answer: B) Stores data in rows and columns

Page 2 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

What type of data model is used by Cassandra? 1

A) Document model
B) Column-family model
C) Key-value model
D) Graph model
Answer: B) Column-family model

13. What is the primary role of a NoSQL database? 1

A) Store data in tables


B) Store data in a flexible format
C) Provide relational data
D) Maintain data integrity
Answer: B) Store data in a flexible format

14. Which of the following is a feature of MongoDB? 1

A) Uses SQL for querying


B) Uses a document-based model
C) Supports only relational data
D) Does not support scalability
Answer: B) Uses a document-based model

15. Which of the following NoSQL databases is known for 1


handling large amounts of unstructured data?

A) MongoDB
B) MySQL
C) Neo4j
D) PostgreSQL
Answer: A) MongoDB

16. Which of the following is an advantage of NoSQL databases 1


over relational databases?

A) Better support for structured data


B) Better scalability and flexibility for large datasets
C) Faster query processing using SQL
D) Limited data types
Answer: B) Better scalability and flexibility for large datasets

17. What makes NoSQL databases ideal for handling big data
applications?

A) They support structured data


B) They have predefined schema
C) They are highly scalable and flexible
D) They only support small datasets
Answer: C) They are highly scalable and flexible

Page 3 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

What is one of the main benefits of MongoDB's document-


based model?

A) Faster data consistency


B) Flexible schema that can store varied data types
C) Strict relational integrity
D) Inability to store unstructured data
Answer: B) Flexible schema that can store varied data types

19. Why are NoSQL databases considered more scalable than


relational databases?

A) They store data in tables


B) They allow for horizontal scaling across servers
C) They only store small amounts of data
D) They use a single centralized server
Answer: B) They allow for horizontal scaling across servers

20. How does a key-value store like Redis work?

A) Stores data as documents with flexible schemas


B) Stores data in key-value pairs
C) Stores data in rows and columns
D) Stores data as graphs
Answer: B) Stores data in key-value pairs

21. Which of the following would be most suitable for a social


network platform to track user relationships?

A) Cassandra
B) Neo4j
C) MongoDB
D) HBase
Answer: B) Neo4j

22. Which NoSQL database is best known for its ability to scale
horizontally?

A) MongoDB
B) MySQL
C) Cassandra
D) Neo4j
Answer: C) Cassandra

23. What is the primary challenge of using relational databases in


cloud environments?

A) High cost
B) Limited scalability
C) Better flexibility
D) High latency
Answer: B) Limited scalability

Page 4 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

Which of the following is a feature of Column-family stores?

A) They store data in key-value pairs


B) They organize data into rows and columns
C) They use documents for storing data
D) They work well with graph-based data
Answer: B) They organize data into rows and columns

25. In what scenario would a document-oriented NoSQL


database like MongoDB be a better choice than a relational
database?

A) When the data is highly structured and fits into rows and
columns
B) When handling large, unstructured data that requires
flexible schema
C) When high transaction integrity is required
D) When the database needs to handle relational data with
complex queries
Answer: B) When handling large, unstructured data that
requires flexible schema

26. Which of the following best describes a key feature of NoSQL


databases in terms of data consistency?

A) Strict consistency across all nodes at all times


B) Eventual consistency for high availability and scalability
C) Complete data consistency, like in relational databases
D) No consistency at all
Answer: B) Eventual consistency for high availability and
scalability

27. Which NoSQL database is known for handling very large-


scale, distributed datasets with high write throughput?

A) MongoDB
B) HBase
C) Neo4j
D) MySQL
Answer: B) HBase

28. Which type of NoSQL database would be best suited for


managing highly interconnected data, like social networks or
recommendation engines?

A) Key-value store
B) Column-family store
C) Document store
D) Graph database
Answer: D) Graph database

Page 5 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

How do NoSQL databases handle schema changes compared to


relational databases?

A) NoSQL databases require a fixed schema


B) NoSQL databases have a flexible schema that allows
changes without downtime
C) NoSQL databases do not support schema changes
D) Relational databases allow more flexibility in schema
changes
Answer: B) NoSQL databases have a flexible schema that
allows changes without downtime

30. Why is it challenging to use relational databases for handling


big data?

A) They have a fixed schema


B) They cannot scale horizontally
C) They lack support for complex queries
D) They do not handle unstructured data well
Answer: B) They cannot scale horizontally

UNIT 1/PART B / 2 Marks


[Link] QUESTIONS MARKS K- CO
SPLIT LEVE
UP L

1. What do you understand by NOSQL databases? 2 K2 CO1


2. Give the difference between Structured vs unstructured data. 2 K2 CO1
3. State the use of NoSQL database system 2 K2 CO1
4. Differentiate between SQL And NoSQL databases. 2 K2 CO1
5. What are the advantages of NOSQL over traditional RDBMS? 2 K2 CO1
6. Write any four benefits of NoSQL 2 K1 CO1
7. What are pros and cons one Graph databases in NOSQL 2 K2 CO1
8. List the different kinds of NOSQL data stores. 2 K2 CO1
9. What are the challenges of using NOSQL databases? 2 K1 CO1
10. List and explain the barriers of NOSQL 2 K2 CO1
11. Explain difference between scaling horizontally and vertically for 2 K2 CO1
databases
12. Differentiate Document-oriented vs. Key-Value mean in context 2 K2 CO1
of NoSQL?
13. Define Eventual Consistency. 2 K1 CO1
14. Explain BASE terminology in a context of NoSQL 2 K1 CO1
15. Explain “Polyglot Persistence” in NoSQL? 2 K1 CO1

Page 6 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

UNIT 1/PART C/ 10 MARKS


[Link] QUESTIONS MARKS K- CO
SPLIT LEV
UP EL

1. Explain briefly about aggregate data models with a neat diagram 10 K2 CO1
and examples
2. What are document databases? List and explain features of 10 K2 CO1
document databases.
3. Define key value store. List out some popular key value 10 K2 CO1
databases. Explain how all the data is stored in a single bucket of
key value data store
4. Elaborate on the causes that led to the emergence of NoSQL 10 K2 CO1
5. Discuss on the value of the relational database 10 K1 CO1
6. Give a comparison study on the relational databases and the 10 K2 CO1
NOSQL stores
7. Write short note on the following: 10 K2 CO1
a. MongoDB
b. Cassandra
c. HBASE
d. Neo4j
8. Explain briefly about impedance mismatch with a neat diagram 10 K2 CO1
9. Define NoSQl and describe the four types of NoSQL database 10 K1 CO1
10. Give a brief description on Application and Integration Databases 10 K2 CO1

Unit 2 (CO2,CO3)

Unit 2 / Part - A / 1 Mark/ MCQ


K
Sl. Marks –
Questions CO
No. Split-up Le
vel
1. 1 K1 CO2
What is the primary purpose of sharding in databases?

(a) To replicate data across multiple servers


(b) To partition data to distribute across multiple servers
(c) To ensure high availability of data
(d) To enforce data consistency across the system

Answer: (b) To partition data to distribute across multiple servers

Page 7 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

1 K1 CO2
In the context of MapReduce, which phase is responsible for
distributing the work across multiple nodes?

(a) Map phase


(b) Shuffle phase
(c) Reduce phase
(d) Distribute phase

Answer: (a) Map phase

3. 1 K1 CO2
Which of the following distribution models is based on having
multiple copies of data stored on separate servers to increase
availability?

(a) Sharding
(b) Master-Slave Replication
(c) Peer-to-Peer Replication
(d) Single Server

Answer: (b) Master-Slave Replication

4. 1 K1 CO2
What is the main advantage of using master-slave replication?

(a) Ensures data consistency across all nodes


(b) Enables read scalability by directing read queries to slaves
(c) Reduces the complexity of managing data
(d) Supports only one data node

Answer: (b) Enables read scalability by directing read queries to


slaves

5. 1 K1 CO2
In a sharded database system, what is typically used to
determine which shard a given record belongs to?

(a) The replication key


(b) The shard key
(c) The master key
(d) The global unique identifier (GUID)

Answer: (b) The shard key

Page 8 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

1 K1 CO2
Which of the following is a key feature of peer-to-peer
replication?

(a) One master node controls all read and write operations
(b) All nodes are equal, and they share read and write operations
(c) There is only one node for storing data
(d) Only the slave nodes handle write operations

Answer: (b) All nodes are equal, and they share read and write
operations

7. 1 K1 CO2
What does combining sharding and replication aim to
achieve?

(a) Simplify the database architecture


(b) Ensure scalability and high availability
(c) Decrease data distribution time
(d) Make backups of data redundant

Answer: (b) Ensure scalability and high availability

8. 1 K1 CO2
Which of the following is a disadvantage of sharding in a
database?

(a) It simplifies the database structure


(b) It increases the potential for data consistency issues
(c) It eliminates the need for replication
(d) It reduces the need for data backups

Answer: (b) It increases the potential for data consistency issues

9. 1 K1 CO2
Which model distributes data and assigns partitions based on a
specific rule (e.g., hash, range)?

(a) Sharding
(b) Master-Slave Replication
(c) Peer-to-Peer Replication
(d) Single Server

Answer: (a) Sharding

Page 9 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

1 K1 CO2
Which of the following is true about the master node in a
master-slave replication model?

(a) It cannot perform write operations


(b) It handles both read and write operations
(c) It only handles read operations
(d) It replicates data to other servers

Answer: (b) It handles both read and write operations

11. 1 K1 CO2
In the context of MapReduce, what is the Shuffle phase
responsible for?

(a) Sorting and distributing data to reducers


(b) Applying map functions to input data
(c) Aggregating the final results
(d) Splitting the input data into chunks

Answer: (a) Sorting and distributing data to reducers

12. 1 K1 CO2
Which of the following is NOT a characteristic of peer-to-peer
replication?

(a) Data is stored across multiple nodes


(b) Any node can handle read and write requests
(c) It reduces the chances of a single point of failure
(d) Only one node holds the master data

Answer: (d) Only one node holds the master data

13. 1 K1 CO2
What happens if a shard fails in a sharded database system?

(a) The entire database becomes unavailable


(b) Only the failed shard becomes unavailable
(c) The replication process is automatically triggered
(d) The data is replicated across all shards

Answer: (b) Only the failed shard becomes unavailable

Page 10 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

1 K1 CO2
In a master-slave replication system, what happens when the
master node fails?

(a) The system stops processing requests


(b) One of the slave nodes can be promoted to master
(c) All slave nodes shut down
(d) A new master node is automatically created

Answer: (b) One of the slave nodes can be promoted to master

15. 1 K1 CO2
Which of the following best describes a "single server"
distribution model?

(a) Data is replicated to multiple servers


(b) Data is stored on a single server, which handles all operations
(c) Data is distributed across different regions
(d) Data is shared across multiple master nodes

Answer: (b) Data is stored on a single server, which handles all


operations

16. 1 K2 CO3
Which of the following is a drawback of using document
databases for large-scale applications?
a) They lack the ability to scale horizontally.
b) They do not support complex queries and joins.
c) They cannot be used in real-time applications.
d) They provide limited availability.
Answer:
b) They do not support complex queries and joins.

17. 1 K2 CO3
Which of the following best describes peer-to-peer replication
in document databases?
a) All nodes are identical, and any node can handle both read and
write operations.
b) Only one node is active, and all other nodes are read-only.
c) Data is stored on a master node, and the slave nodes only handle
queries.
d) Nodes are organized in a hierarchical structure with a central
coordinator.
Answer:
a) All nodes are identical, and any node can handle both read and
write operations.

Page 11 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

1 K1 CO3
When should you avoid using document databases?
a) When the application requires flexible schema and high
scalability.
b) When complex transactions spanning multiple operations are
needed.
c) When you need to perform large-scale data aggregation and
analytics.
d) When you are handling semi-structured or unstructured data.
Answer:
b) When complex transactions spanning multiple operations are
needed.

19. 1 K1 CO3
28. Which of the following is NOT typically a feature of
document databases?
a) Support for JSON and BSON data formats.
b) Strong consistency and ACID transactions across distributed
nodes.
c) Horizontal scaling through sharding.
d) Flexible schema that supports various data structures.
Answer:
b) Strong consistency and ACID transactions across distributed
nodes.

20. 1 K2 CO3
What is the purpose of indexing in MongoDB?
a) To enforce consistency across multiple servers.
b) To speed up query processing by allowing faster lookups.
c) To store large datasets efficiently in a single document.
d) To automatically replicate data across nodes.
Answer:
b) To speed up query processing by allowing faster lookups.

21. Which of the following best describes a Document Database? 1 K1 CO3

● a) It stores data in tables with fixed schemas.


● b) It stores data in documents like JSON or XML.
● c) It uses SQL to query data.
● d) It stores data as key-value pairs only.

Answer: b) It stores data in documents like JSON or XML

Page 12 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

What is a typical consistency model used in Document 1 K1 CO3


Databases?

● a) Strong consistency
● b) Eventual consistency
● c) Immediate consistency
● d) No consistency

Answer: b) Eventual consistency

23. Which of the following is a suitable use case for a Document 1 K1 CO3
Database?

● a) Banking applications
● b) Content management systems
● c) Real-time complex transactions
● d) Data warehousing

Answer: b) Content management systems

24. Which of the following is true about horizontal scaling in 1 K1 CO3


Document Databases?

● a) It increases the database's size by upgrading the server's


hardware.
● b) It distributes data across multiple servers to handle more
load.
● c) It limits the system to a single server.
● d) It reduces the database's complexity.

Answer: b) It distributes data across multiple servers to handle


more load.

25. Which format is commonly used to store data in Document 1 K1 CO3


Databases?

● a) CSV
● b) JSON
● c) XML
● d) All of the above

Answer: d) All of the above

Page 13 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

How does eventual consistency work in Document Databases? 1 K2 CO3

● a) Data is synchronized across all nodes immediately after


an update.
● b) Data consistency is not important in Document
Databases.
● c) Updates to data are propagated across nodes over time,
but not immediately.
● d) Document Databases do not support any form of
consistency.

Answer: c) Updates to data are propagated across nodes over time,


but not immediately.

27. What is the key advantage of using Document Databases for 1 K2 CO3
Content Management Systems (CMS)?

● a) They support complex SQL queries.


● b) They store data in a rigid, fixed schema.
● c) They allow storing varied content types and data
structures in a flexible manner.
● d) They require highly structured data for efficiency.

Answer: c) They allow storing varied content types and data


structures in a flexible manner.

28. Why are Document Databases suitable for web analytics or 1 K2 CO3
real-time analytics applications?

● a) They perform complex joins and aggregations


efficiently.
● b) They are optimized for fast insertions and scalability
with semi-structured data.
● c) They work well only with highly structured data.
● d) They do not allow for horizontal scaling.

Answer: b) They are optimized for fast insertions and scalability


with semi-structured data.

29 When might a Document Database not be ideal to use? 1 K2 CO3

● a) When handling simple queries with consistent data.


● b) When working with complex transactions across
multiple documents.
● c) When working with flexible data formats.
● d) When needing horizontal scalability for large data
volumes.

Answer: b) When working with complex transactions across


multiple documents.

Page 14 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

30 Which of the following is a primary challenge of using 1 K2 CO3


Document Databases in e-commerce applications?

● a) They cannot scale horizontally.


● b) They struggle with complex multi-table queries.
● c) They lack flexibility in data schema.
● d) They do not support any form of consistency.

Answer: b) They struggle with complex multi-table queries.

UNIT 2/PART A / 2 Marks


[Link] QUESTIONS MARKS K- CO
SPLIT LEVE
UP L

1. What do u know about database sharding in the NoSQL database? 2 K1 CO2


2. What is map reduce on a database? 2 K1 CO2
3. Define Peer to peer Replication 2 K1 CO2
4. What is meant by Single Server? When do we use the Single 2 K1 CO2
Server Distribution model?
5. Explain the two styles of distributing data. 2 K1 CO2
6. Outline Master-Slave Replication. 2 K1 CO2
7. What is meant by Key Value Store? 2 K1 CO2
8. Define MongoDB. 2 K1 CO2
9. What is a Document Database? 2 K1 CO3
10. Which data formats are commonly used in Document Databases? 2 K1 CO3
11. Which consistency model is typically used in Document 2 K1 CO3
Databases?
12. What type of scaling do Document Databases generally support? 2 K1 CO3
13. How does eventual consistency work in a Document Database? 2 K2 CO3
14. Illustrate how document database is useful in Event Logging 2 K1 CO3
15. How does the structure of data in Document Databases benefit 2 K2 CO3
Content Management Systems (CMS)?

UNIT 2/PART C/ 10 MARKS


[Link] QUESTIONS MARKS K- CO
SPLIT UP LEV
EL

1. Explain the concepts of replication and sharding in distributed 10 K1 CO2


databases. How do they work together to enhance performance
and reliability
2. What is MapReduce, and how is it used in databases for 10 K2 CO2
processing large datasets?
3. Describe the different distribution models in databases, with 10 K1 CO2
examples of how each works.

Page 15 of 16
CAT1 _QB_20ITEL609 / NoSQL Database Techniques

Explain the difference between Master-Slave and Peer-to-Peer 10 K2 CO2


Replication in database systems.
5. Explain the role of MongoDB, a NoSQL Key-Value database, 10 K1 CO2
in addressing challenges of large-scale distributed
applications.
6. Define Document Databases and explain the key features that 10 K1 CO3
make them different from traditional relational databases.
7. Explain the role of indexing in optimizing queries in 10 K2 CO3
Document Databases.
8. Discuss the advantages and disadvantages of using Document 10 K2 CO3
Databases for Content Management Systems (CMS).
9. What is eventual consistency, and how does it differ from 10 K2 CO3
strong consistency in Document Databases?
10. How do Document Databases support event logging and real- 10 K2 CO3
time analytics?

Page 16 of 16

You might also like