©THESTAR EXAM SOLUTIONS 2024/2025
ALL RIGHTS RESERVED.
DM – NOSQL Exam Questions With
Verified And Updated Answers
NoSQL vs Relational Databases - answer✔Relational databases use tables/rows/columns, need
a predefined schema, and are vertically scalable. NoSQL databases are schema-less, fast,
horizontally scalable, and do not guarantee ACID transactions.
Types of NoSQL Databases - answer✔Key-value databases, document databases, column family
databases, and graph databases.
Key-Value Databases - answer✔Simplest NoSQL databases that get and set values associated
with a unique key.
Key - answer✔Examples: DataCampCourse:123:name, Client456, 123456789. Keys can be any
binary sequence and are unique.
Value - answer✔Associated with a key. Examples: numbers, strings, JSON, images. There may
be size restrictions on values.
Advantages of Key-Value Databases - answer✔Simple key-value tuple, schema-less, fast
operations, flexible data types, horizontally scalable with sharding.
Basic Operations key value - answer✔Put: inserts or updates a key-value pair. Get: retrieves the
value for a given key. Delete: removes a key and its value.
Limitations of Key-Value Databases - answer✔Only search by key, not suitable for complex
queries. Some key-value databases allow secondary indexing or search by multiple keys.
Suitable Use Cases key value - answer✔User sessions, user profiles/preferences, shopping carts,
real-time recommendations, advertising.
Unsuitable Use Cases key value - answer✔Searching data by its value, or handling related data
with complex relationships.
Redis - answer✔Redis is a fast, in-memory key-value database, also used as a cache and
message broker. It can persist data to disk.
1|Page
, ©THESTAR EXAM SOLUTIONS 2024/2025
ALL RIGHTS RESERVED.
Redis Data Structures - answer✔Supports strings, lists, sets, and hashes. Example: SET name
Ann, RPUSH my_numbers 1 2 3, HMSET user:123 name Ann surname Smith.
Popular Uses of Redis - answer✔Caching query results, session storage, real-time analytics,
leaderboards, messaging queues.
Redis Features - answer✔Atomic operations, transactions, Lua scripting, asynchronous
replication, supports many programming languages (Python, R, C#, Java, JavaScript).
Redis Cloud Services - answer✔Available via AWS Elasticache, Microsoft Azure Cache for Redis,
and Alibaba ApsaraDB.
Case Study: Editoo - answer✔Small business using Redis to store user sessions and cache
database queries. Results: reduced downtime, improved performance, and future migrations
from relational databases to Redis.
NoSQL vs Relational Databases - answer✔Relational databases use tables/rows/columns, need
a predefined schema, and are vertically scalable. NoSQL databases are schema-less, fast,
horizontally scalable, and do not guarantee ACID transactions.
Types of NoSQL Databases - answer✔Key-value databases, document databases, column family
databases, and graph databases.
Key-Value Databases - answer✔Simplest NoSQL databases that get and set values associated
with a unique key.
Key - answer✔Examples: DataCampCourse:123:name, Client456, 123456789. Keys can be any
binary sequence and are unique.
Value - answer✔Associated with a key. Examples: numbers, strings, JSON, images. There may
be size restrictions on values.
Advantages of Key-Value Databases - answer✔Simple key-value tuple, schema-less, fast
operations, flexible data types, horizontally scalable with sharding.
Basic Operations - answer✔Put: inserts or updates a key-value pair. Get: retrieves the value for
a given key. Delete: removes a key and its value.
Limitations of Key-Value Databases - answer✔Only search by key, not suitable for complex
queries. Some key-value databases allow secondary indexing or search by multiple keys.
Suitable Use Cases - answer✔User sessions, user profiles/preferences, shopping carts, real-time
recommendations, advertising.
2|Page