Relational & NoSQL Database Design Flashcards
7 cards from real CCP practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Relational & NoSQL Database Design flashcards as text
Which database design pattern involves storing JSON or XML documents within a relational column to handle semi-structured data?
Answer: Hybrid storage (JSON column)
Modern relational databases like PostgreSQL and MySQL support JSON column types that allow semi-structured document storage while retaining relational capabilities.
What is the primary purpose of the EXPLAIN command in SQL?
Answer: To show the query execution plan chosen by the optimizer
EXPLAIN (or EXPLAIN ANALYZE) displays the execution plan the query optimizer selects, helping developers identify performance bottlenecks and optimize queries.
In a column-family NoSQL database like HBase, data is organized into:
Answer: Rows identified by a row key, grouped into column families
Column-family databases group related columns into column families, allowing efficient retrieval of all columns in a family for a given row key.
Which isolation level prevents dirty reads but still allows non-repeatable reads in SQL transactions?
Answer: Read Committed
Read Committed prevents dirty reads by only allowing reads of committed data, but the same row can return different values if re-read within the same transaction.
What does sharding accomplish in a NoSQL or distributed database context?
Answer: Horizontally partitions data across multiple nodes to distribute load
Sharding splits a large dataset into smaller partitions (shards) distributed across multiple nodes, enabling horizontal scaling and parallel query execution.
Which SQL aggregate function returns the number of rows that satisfy a condition, excluding NULL values?
Answer: COUNT(column)
COUNT(column) counts only non-NULL values in the specified column, whereas COUNT(*) counts all rows including those with NULLs.
Which concept describes the practice of splitting a single large table into smaller tables based on column groups to improve I/O performance?
Answer: Vertical partitioning
Vertical partitioning splits a table by columns, keeping frequently accessed columns in one table and rarely accessed columns in another to reduce I/O per query.