Big Data

NoSQL Databases — Practice MCQs for CCAT

20 Questions Section B: Programming Big Data

Practice 20 NoSQL Databases multiple-choice questions designed for CDAC CCAT exam preparation. Click "Show Answer" to reveal the correct option with detailed explanation.

Q1.
NoSQL stands for:
ANo SQL allowed
BNot only SQL
CNew SQL
DNon-standard SQL
Show Answer & Explanation

Correct Answer: B — Not only SQL

NoSQL means "Not only SQL" - databases that provide mechanisms other than traditional relational models.

Q2.
MongoDB is a:
ARelational database
BDocument-oriented database
CGraph database
DKey-value store
Show Answer & Explanation

Correct Answer: B — Document-oriented database

MongoDB stores data as flexible JSON-like documents (BSON), making it a document-oriented database.

Q3.
Redis is primarily used as:
ADocument store
BIn-memory key-value store/cache
CGraph database
DColumn family store
Show Answer & Explanation

Correct Answer: B — In-memory key-value store/cache

Redis is an in-memory key-value store, often used for caching, sessions, and real-time analytics.

Q4.
Cassandra is known for:
AACID transactions
BHigh write throughput and availability
CComplex joins
DSmall data sets
Show Answer & Explanation

Correct Answer: B — High write throughput and availability

Cassandra is designed for high write throughput, high availability, and linear scalability.

Q5.
Neo4j is a:
ADocument database
BKey-value store
CGraph database
DColumn database
Show Answer & Explanation

Correct Answer: C — Graph database

Neo4j is a graph database optimized for storing and querying highly connected data.

Q6.
ACID properties are fully supported by:
AAll NoSQL databases
BMost NoSQL databases
CFew NoSQL databases, mostly RDBMS
DNo database
Show Answer & Explanation

Correct Answer: C — Few NoSQL databases, mostly RDBMS

ACID is traditionally an RDBMS strength. Most NoSQL databases prioritize availability over strict ACID.

Q7.
BASE in NoSQL stands for:
ABasic Availability, Soft state, Eventual consistency
BBest Available Storage Engine
CBalanced System Environment
DBasic Access Service Entry
Show Answer & Explanation

Correct Answer: A — Basic Availability, Soft state, Eventual consistency

BASE: Basically Available, Soft state, Eventual consistency - NoSQL alternative to ACID.

Q8.
Which NoSQL type is best for user profiles and session data?
AGraph database
BColumn family
CKey-value store
DTime series database
Show Answer & Explanation

Correct Answer: C — Key-value store

Key-value stores are ideal for session data and user profiles - fast lookup by key.

Q9.
Column family databases like Cassandra store data:
AAs rows only
BAs columns grouped into families
CAs documents
DAs graphs
Show Answer & Explanation

Correct Answer: B — As columns grouped into families

Column family databases store data in columns grouped into column families, optimizing for specific query patterns.

Q10.
Eventual consistency means:
AData is always consistent
BData will become consistent given enough time
CData is never consistent
DConsistency is optional
Show Answer & Explanation

Correct Answer: B — Data will become consistent given enough time

Eventual consistency guarantees that, given no new updates, all replicas will eventually converge to the same value.

Q11.
Sharding in NoSQL databases:
ACreates backups
BHorizontally partitions data across nodes
CCompresses data
DEncrypts data
Show Answer & Explanation

Correct Answer: B — Horizontally partitions data across nodes

Sharding distributes data horizontally across multiple nodes based on a shard key.

Q12.
CouchDB uses which query language?
ASQL
BMapReduce views and Mango queries
CGraphQL
DXQuery
Show Answer & Explanation

Correct Answer: B — MapReduce views and Mango queries

CouchDB uses MapReduce views for complex queries and Mango for declarative JSON queries.

Q13.
Which NoSQL database is best for social network relationships?
AMongoDB
BRedis
CNeo4j
DCassandra
Show Answer & Explanation

Correct Answer: C — Neo4j

Graph databases like Neo4j excel at traversing relationships, perfect for social networks.

Q14.
In MongoDB, a collection is similar to:
AA database
BA table in RDBMS
CA column
DA foreign key
Show Answer & Explanation

Correct Answer: B — A table in RDBMS

MongoDB collections are analogous to RDBMS tables - they group related documents.

Q15.
DynamoDB is developed by:
AGoogle
BAmazon
CMicrosoft
DFacebook
Show Answer & Explanation

Correct Answer: B — Amazon

DynamoDB is Amazon's fully managed NoSQL database service on AWS.

Q16.
Time-to-Live (TTL) in Redis:
AIs not supported
BAutomatically expires keys after specified time
CMeasures query time
DIs a replication setting
Show Answer & Explanation

Correct Answer: B — Automatically expires keys after specified time

TTL automatically deletes keys after a specified duration - useful for caching and session management.

Q17.
Schemaless in NoSQL means:
ANo data structure
BFlexible schema that can vary between documents
CNo security
DNo indexes
Show Answer & Explanation

Correct Answer: B — Flexible schema that can vary between documents

Schemaless allows documents in the same collection to have different fields and structures.

Q18.
Write-ahead logging (WAL) in databases ensures:
AFaster reads
BDurability by logging before writing
CData compression
DQuery optimization
Show Answer & Explanation

Correct Answer: B — Durability by logging before writing

WAL logs changes before applying them to data files, ensuring durability in case of crashes.

Q19.
Which is NOT a NoSQL database?
AMongoDB
BPostgreSQL
CCassandra
DRedis
Show Answer & Explanation

Correct Answer: B — PostgreSQL

PostgreSQL is a traditional relational database (RDBMS), not a NoSQL database.

Q20.
Quorum in distributed NoSQL databases refers to:
ADatabase size
BMinimum nodes that must agree for operation success
CQuery language
DCompression ratio
Show Answer & Explanation

Correct Answer: B — Minimum nodes that must agree for operation success

Quorum defines the minimum number of nodes that must acknowledge an operation for it to succeed.