A customer table includes several large, rarely used columns, such as a profile photo and free-text notes, alongside small columns that are read constantly. The DBA moves the large columns into a separate table that shares the customer primary key. Which technique is this?
Select an answer to reveal the explanation.
Short Explanation
Think of slicing a cake. Cut down through the layers and you're splitting columns, that's vertical. Cut across the layers and you're splitting rows, that's horizontal. Moving the bulky photo and notes columns to their own table is a vertical cut, so don't let the row-based options tempt you.
Full Explanation
Vertical partitioning divides a table by columns: frequently accessed columns remain in one table, while large or rarely used columns move to another table linked by the same primary key. Rows in the main table become narrower, so more fit on each page, which improves cache efficiency and reduces I/O for the common queries, while the large columns are read only when needed through a join on the key. Horizontal partitioning divides a table by rows, assigning each row to a partition based on a value such as a date range; every partition keeps all columns, so it does not address wide rows. Hash partitioning is a form of horizontal partitioning in which a hash function on the key determines each row's partition, spreading rows evenly; again, all columns stay together. Sharding is horizontal partitioning across separate servers or databases, distributing subsets of rows to scale out storage and throughput; it is about rows and servers, not about separating large columns. Exam caveat: normalization also produces separate tables, but its goal is to remove redundancy and update anomalies based on functional dependencies, whereas vertical partitioning is a physical design choice made for performance with no change in what the data means. Operational check: confirm the split tables share the primary key, enforce a one-to-one relationship with a foreign key, update queries that need the large columns, and compare logical reads for the common queries before and after.