How should you configure the keys?

HOTSPOT
You manage the data warehouse for a large retail company. The company has many store locations. Each location runs their own independent sales systems.
They report daily sales and receipt information to a central system every night. You plan to load data from all locations into a fact table named fact.Sales by using SQL Server Integration Services (SSIS) packages. You create the following Transact-SQL statement:

You need to select the columns for the primary key and clustered column key. The keys must meet the following requirements:
Prevent duplicate rows from being entered by a single system.
Allow for point lookups of a single sale.
Minimize storage requirements for nonclustered indexes.
Store rows in the order that they are inserted into the table.
How should you configure the keys? To answer, select the appropriate column type in the answer area.
Hot Area:

microsoft-exams

2 thoughts on “How should you configure the keys?

  1. It doesn’t make sense to use SaleId in a primary key that is supposed to prevent the loading of duplicate rows from the store systems because each SaleId is a new unique value anyway, created when a new row is inserted into the data warehouse table. Primary key should be StoreId and SystemId.

    1. In the description is says that sales are loaded from multiple store location (well, it says there are multiple store locations). So i assume the SaleId is only unique per store. Thus adding StoreId to the primairy key column will surely make it unique.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.