Question 1
Topic: Design and develop database solutions
Skill tested: Designs partitioned tables and indexes around retention and query predicates.
A logistics company stores several billion shipment events in Azure SQL Database. Most operational queries filter by a shipment date range, and the compliance team requires efficient removal of data older than seven years. New events arrive continuously, and the company wants to avoid large delete operations that generate substantial transaction log activity. Which design best meets these requirements?
Date-based partitioning supports partition elimination when queries constrain the partitioning column and lets administrators remove a whole expired partition through partition switching or partition management rather than deleting every row. Aligned indexes make partition-level operations more manageable. A date index alone does not avoid the logging and workload of deleting billions of rows. Separate databases increase operational and query complexity, while a year-only uniqueness constraint would incorrectly restrict rows and does not provide partition-based retention.