Just as a rule of thumb, your dimension tables should have very simple primary keys, consisting of a single field. In most cases you should consider a surrogate key. Even if your dimension seems to have a natural key or a key coming from the transactional database, you are always only one requirement change away from having to support a slowly changing dimension.
Data Warehouse how to connect fact table with foreign key to dimension table whose primary key contains two attributes
-
18-06-2023 - |
سؤال
I want to design my Data Warehouse fact-dimension schema, fact table should have several foreign keys, Aid, Bid, Cid.... refer to dimension tables A, B, C,.... respectively. However, dimension table C has an unique key (Aid, Cid). In this case, is that possible for link the fact record to the dimension table C with two keys (Aid and Cid)? Or I should apply another dimension table including only primary key? Thanks a lot!
المحلول
لا تنتمي إلى StackOverflow