Determine dimension keys and key relationships for a data warehouse
Dimension keys are required to create table relationships in a data warehouse. These relationships are used to enforce referential integrity and to provide a connection between tables to satisfy logical joins, such as inner, outer, and cross joins.
Table relationships are created between primary keys and foreign keys through foreign key constraints in SQL Server.
In star and snowflake schemas, fact tables reference dimension tables’ primary key column values. In snowflake schemas, certain dimensions might also reference other dimension tables’ primary key column values. These table relationships can be classified according to the cardinality between tables.
Cardinality refers to the number of occurrences of a dimension member in one table compared to the number of occurrences in the other table. In other words, cardinality tells you how many times a column value is referenced in each side of the table relationship.
The degree of relationship between tables in a data warehouse can be classified into five main types:
- Zero-to-One (0:1)
- One-to-One (1:1)
- One-to-Many (1:M)
- Many-to-Many (M:M)
- Self-referencing
Comments
Post a Comment