Populating Fact vs Dimension Tables

  • When populating a new database with data, is it better to populate the fact or dimension tables first?

    Dimension is better to populate first, correct?

  • Assuming you have built a database schema with referential integrity, you would have to populate dimension records before fact records or you would violate foreign key constraints.

    In most data warehouse solutions, you would be using surrogate keys that are generated by inserting your dimension records, so if you have not populated the dimensions you would not have the surrogate key values available for your fact records.

  • Great, that was my plan but I wanted to be sure. 🙂

    Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply