data warehous key structure setup

  • I am creating a relationship in a data warehouse and would like to know what people think is the most efficient way to create the key structure between the tables.

    Is setting the field as a uniqueidentidier and using the NEWID() function the best and most effifient way to populate your key structure?

    Or, should I just set them up as int and populate them using a custom function?

    Or, is there another way?

    Thanks for the info.

     

  • It is a data warehouse so I would guess there is already a 'structure' in place for foreign keys.

    If not...

    It will take multiple steps whether you use NewID() or identity. I am an Identity fan mainly from convenience and ability to enter a key manually instead of sending GUID keys in emails or IMs.

    Multiple Steps: Insert the parent data (Customer) and then use that table to populate orders with a CustomerID

    Good Luck

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

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