
Explanation:
A surrogate key is a system-generated unique identifier that serves as a substitute for natural keys in a database table. For the retail store table, implementing a surrogate key using an IDENTITY property is the optimal solution for several reasons:
Option B (System-versioned temporal table): While temporal tables are excellent for tracking historical changes, they don't inherently provide surrogate key functionality. Temporal tables focus on versioning existing data rather than generating unique identifiers.
Option C (User-defined SEQUENCE object): SEQUENCE objects can generate unique values, but they require explicit management and additional code to assign values to table columns. This adds complexity compared to the automatic nature of IDENTITY properties.
Option D (Table with FOREIGN KEY constraint): FOREIGN KEY constraints enforce referential integrity between tables but do not generate surrogate keys. They rely on existing primary keys in related tables rather than creating new unique identifiers.
The IDENTITY property approach aligns with Azure Data Engineering best practices for creating efficient, maintainable surrogate keys that support the performance and integrity requirements of sales transaction datasets.
Ultimate access to all questions.
You need to implement a surrogate key for the retail store table that meets the requirements of the sales transaction dataset. What should you create?
A
a table that has an IDENTITY property
B
a system-versioned temporal table
C
a user-defined SEQUENCE object
D
a table that has a FOREIGN KEY constraint
No comments yet.