Uniquely identifying data in tables with Compound Key attribute:
The types of keys that can be assigned to a table include:• | Simple key requires only one column to identify a record uniquely within a table. |
• | Compound key requires multiple columns to identify a unique record. |
The simple key shows how you can identify a calling center with only its
Call_Ctr_id
. This means that every calling center has its own unique ID.In the compound key, calling centers are identified by both
Call_Ctr_id
and Region_id
. This means that two calling centers from different regions can share the same Call_Ctr_id
. For example,
there can be a calling center with ID 1 in region A, and another
calling center with ID 1 in region B. In this case, you cannot identify a
unique calling center without knowing both the Call_Ctr_id
and the Region_id
.Simple keys are generally easier to handle in the data warehouse than are compound keys because they require less storage space and they allow for simpler SQL. Compound keys tend to increase SQL query complexity, query time, and required storage space. However, compound keys have a more efficient ETL process.
Comments
Post a Comment