Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

NoSQL Databases Quiz

Total questions: 72

Worksheet time: 2hrs 16mins

Name
Class
Date
1.

Explore the commonalities in querying mechanisms between SQL and MongoDB, including filters, projections, and aggregation capabilities.

4 lines
2.

Learn techniques to retrieve data from HBase using filters, scans, and key-based lookups.

4 lines
3.

Understand how to perform efficient data retrieval in Redis using key-based access, pattern matching, and data structures like hashes, lists, and sets.

4 lines
4.

Examine how to transition between different document databases (e.g., MongoDB to CouchDB), covering data modeling, export/import, and compatibility issues.

4 lines
5.

Study how schema changes are managed in databases like HBase, including column family modifications and backward compatibility.

4 lines
6.

Learn the processes and tools (e.g., Apache Hadoop, HBase shell) for data import/export operations in HBase.

4 lines
7.

Understand how to handle changes in data structures in key-value databases like Redis, including versioning and migration strategies.

4 lines
8.

Define and implement a table with column families and qualifiers for real-world datasets.

4 lines
9.

Practice storing, retrieving, and updating key/value data in Redis.

4 lines
10.

Use commands such as SET, GET, DEL, and implement more complex operations involving data structures and transactions.

4 lines
11.

Explore the commonalities in querying mechanisms between SQL and MongoDB, including filters, projections, and aggregation capabilities.

4 lines
12.

SQL (Structured Query Language) and MongoDB (a NoSQL document-based database) follow different paradigms-relational vs. document-based-but they share many conceptual similarities in querying mechanisms. This makes it easier for developers with SQL knowledge to adapt to MongoDB.

4 lines
13.

While MongoDB uses JSON-style syntax and SQL uses declarative language, both provide powerful and similar querying capabilities. Understanding these parallels helps in transitioning between the two and designing data queries efficiently.

4 lines
14.

HBase is modeled after Google Bigtable and provides a distributed, scalable, big data store. It is part of the Hadoop ecosystem and is well-suited for read/write-intensive applications.

4 lines
15.

HBase, a prominent column-oriented NoSQL database, is widely used for handling large-scale data across distributed systems. Accessing data from HBase typically involves these steps: Understanding Table Structure: HBase tables are comprised of rows, columns (grouped into column families), and timestamps. Data is stored in key-value pairs, and rows are uniquely identified by row keys.

4 lines
16.

You can connect using APIs provided by HBase, such as Java, Python, or REST API.

4 lines
17.

Use APIs to write data into HBase by specifying row keys and column family.

4 lines
18.

Retrieve data using Get or Scan operations. A Get retrieves specific rows by row keys, while Scan allows fetching multiple rows in a range.

4 lines
19.

Modify or remove data using similar APIs.

4 lines
20.

Apply filters during Scan operations to narrow down the data fetched based on conditions like timestamps, column values, etc.

4 lines
21.

To enhance performance, use techniques like caching (Helps reduce disk I/O and improves read performance.), efficient row key design, and compression options.

4 lines
22.

HBase integrates seamlessly with Hadoop ecosystems and tools like Apache Phoenix for SQL-like querying.

4 lines
23.

Tables in HBase are made up of: Rows (identified by a unique row key), Column families (groups of related columns), Columns (key-value pairs under a family), Timestamps (for versioning). Data is stored sorted by row key.

4 lines
24.

Most Efficient Access Method: Directly fetches data associated with a given row key. Can be used to: Retrieve entire row data, Retrieve specific column families or columns.

4 lines
25.

Used when row key is not known. Retrieves multiple rows starting from a specific point. Useful for range queries or retrieving all data.

4 lines
26.

Filters help in reducing the data fetched during a scan.

4 lines
27.

Common HBase Filters: RowFilter, PrefixFilter, SingleColumnValueFilter, PageFilter, ColumnPrefixFilter.

4 lines
28.

Pagination with PageFilter to process data in chunks. Column Range Filters to select only a range of columns. Combining Filters using FilterList (AND/OR logic).

4 lines
29.

Use row key-based lookups wherever possible (very fast). Avoid full table scans on large tables. Always use filters when scanning large datasets. Design row keys smartly to support access patterns and avoid hotspots (e.g., reverse timestamps, region-based prefixes).

4 lines
30.

Use Case: IoT Sensor Data, Data Access Pattern: Scan data by time range.

4 lines
31.

Use Case: Student Database, Data Access Pattern: Get student details by ID.

4 lines
32.

Use Case: Order Tracking System, Data Access Pattern: PrefixFilter by order ID prefix.

4 lines
33.

Use Case: Social Media Posts, Data Access Pattern: Range scan by timestamp.

4 lines
34.

Technique: Get, When to Use: When row key is known, Example: get 'students', '1001'.

4 lines
35.

Technique: Scan, When to Use: When multiple rows are needed, Example: scan 'students'.

4 lines
36.

Technique: Filter, When to Use: When conditional selection is needed, Example: SingleColumnValueFilter etc.

4 lines
37.

Understand how to perform efficient data retrieval in Redis using key-based access, pattern matching, and built-in data structures like hashes, lists, and sets.

4 lines
38.

Redis (Remote Dictionary Server) is an in-memory, key-value NoSQL database known for high performance, low latency, and support for complex data structures.

4 lines
39.

All data in Redis is stored and accessed using unique keys.

4 lines
40.

Redis allows searching keys using wildcard patterns with the KEYS command.

4 lines
41.

What command is recommended for production use instead of KEYS?

a)

KEYS

b)

SCAN

42.

What is the command to set a string value in Redis?

a)

SET

b)

GET

c)

DEL

43.

What command is used to retrieve all key-value pairs of a hash?

a)

HGET

b)

HGETALL

c)

HSET

44.

What command is used to add multiple keys in Redis?

a)

SET

b)

HSET

c)

SADD

45.

What is the command to check if a key exists in Redis?

a)

EXISTS

b)

DEL

c)

GET

46.

What command is used to add a product to a user's cart in Redis?

a)

HSET

b)

SET

c)

LPUSH

47.

What is the command to delete a key in Redis?

a)

DEL

b)

EXISTS

c)

GET

48.

What command is used to retrieve a specific field from a hash?

a)

HGET

b)

HSET

c)

HGETALL

49.

What command is used to add an item to a list in Redis?

a)

LPUSH

b)

RPUSH

c)

LRANGE

50.

What command is used to check the time to live of a key?

a)

TTL

b)

EXPIRE

c)

GET

51.

What is the command to add a score to a sorted set in Redis?

a)

ZADD

b)

ZRANGE

c)

SADD

52.

What command is used to retrieve all members of a set?

a)

SMEMBERS

b)

SADD

c)

SISMEMBER

53.

What command is used to retrieve a range of elements from a sorted set?

a)

ZRANGE

b)

ZADD

c)

ZREVRANGE

54.

What command is used to expire a key after a certain time?

a)

EXPIRE

b)

TTL

c)

DEL

55.

What is the command to check if an item exists in a set?

a)

SISMEMBER

b)

SMEMBERS

c)

SADD

56.

What command is used to retrieve all tasks in order from a list?

a)

LRANGE

b)

LPUSH

c)

RPUSH

57.

What command is used to add a score to a leaderboard in Redis?

a)

ZADD

b)

ZRANGE

c)

SADD

58.

What command is used to retrieve all tasks in a task queue?

a)

LRANGE

b)

LPUSH

c)

RPUSH

59.

What command is used to retrieve a specific field from a hash?

a)

HGET

b)

HSET

c)

HGETALL

60.

What command is used to add a product to a user's cart in Redis?

a)

HSET

b)

SET

c)

LPUSH

61.

What command is used to delete a key in Redis?

a)

DEL

b)

EXISTS

c)

GET

62.

What command is used to check if a key exists in Redis?

a)

EXISTS

b)

DEL

c)

GET

63.

What are the basic units for schema definition in HBase?

a)

Column Families

b)

Rows

c)

Columns

d)

Tables

64.

What happens when you add a new column to a row in HBase?

a)

It affects all existing data

b)

Only affected rows are updated

c)

It requires schema modification

d)

It deletes old data

65.

What is a key consideration for backward compatibility in HBase?

a)

Adding new columns

b)

Deleting column families

c)

Renaming columns

d)

Changing column family properties

66.

What should you avoid doing with column families in HBase?

a)

Adding new columns

b)

Deleting column families

c)

Modifying column properties

d)

Renaming columns

67.

What is the recommended practice for managing schema evolution?

a)

Minimize column family changes

b)

Delete old data immediately

c)

Rename columns frequently

d)

Avoid using version control

68.

What is the first step in simulating HBase concepts using Pandas?

a)

Create sample data with Column Families

b)

Export data to CSV

c)

Import data from CSV

d)

Add new Column Family

69.

What is the purpose of the HBase compaction process?

a)

To delete old data

b)

To clean up deleted or obsolete data

c)

To add new columns

d)

To modify column families

70.

What does HBase use to store data versions?

a)

Timestamps

b)

Row keys

c)

Column families

d)

Schema definitions

71.

What is the effect of changing column family properties in HBase?

a)

It affects old data immediately

b)

It only affects new data

c)

It requires schema migration

d)

It deletes old data

72.

What is the recommended action before applying schema changes to production?

a)

Test schema changes on a staging system

b)

Apply changes directly

c)

Delete old data

d)

Modify column families