0
0
HLDsystem_design~20 mins

Horizontal vs vertical partitioning in HLD - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Partitioning Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Horizontal Partitioning

Which of the following best describes horizontal partitioning in database design?

ADividing a table into multiple tables each containing a subset of columns
BMerging multiple tables into one large table to improve query speed
CCreating a backup of the entire database on multiple servers
DSplitting a table into multiple tables each containing a subset of rows based on a key
Attempts:
2 left
💡 Hint

Think about dividing data by rows rather than columns.

🧠 Conceptual
intermediate
2:00remaining
Understanding Vertical Partitioning

Which option correctly explains vertical partitioning in database systems?

ACombining multiple tables into one to reduce joins
BSplitting a table into smaller tables each containing a subset of columns
CCreating multiple copies of the same table for redundancy
DDistributing rows of a table across multiple servers
Attempts:
2 left
💡 Hint

Focus on dividing data by columns instead of rows.

scaling
advanced
3:00remaining
Choosing Partitioning for Large User Data

You have a user database with millions of records and many columns. You want to improve query speed for user profile info and reduce server load. Which partitioning strategy is best?

AVertical partitioning by splitting frequently accessed profile columns from less used columns
BNo partitioning, keep all data in one table for simplicity
CHorizontal partitioning by user region to distribute rows across servers
DCreate multiple full copies of the user table on different servers
Attempts:
2 left
💡 Hint

Consider which data is accessed most often and how to reduce data scanned per query.

tradeoff
advanced
3:00remaining
Tradeoffs Between Horizontal and Vertical Partitioning

Which statement correctly describes a tradeoff when choosing between horizontal and vertical partitioning?

AVertical partitioning eliminates the need for database normalization
BVertical partitioning reduces the number of rows but increases the number of columns in each table
CHorizontal partitioning improves write scalability but can increase complexity in queries joining multiple partitions
DHorizontal partitioning always reduces the need for indexes on tables
Attempts:
2 left
💡 Hint

Think about how data is split and how queries might be affected.

estimation
expert
4:00remaining
Estimating Storage Savings with Vertical Partitioning

A table has 1 million rows and 50 columns. 10 columns are accessed frequently and 40 rarely. Each row is 1 KB total. If vertical partitioning splits the table into two tables (10 columns and 40 columns), approximately how much storage is saved when querying only the frequently accessed columns?

AAbout 80% storage saved per query by scanning only 10 columns
BNo storage saved because all data is still stored together
CAbout 20% storage saved because 10 columns are smaller than 40
DAbout 50% storage saved because half the columns are separated
Attempts:
2 left
💡 Hint

Consider the proportion of columns accessed and data scanned per query.