Merging database having same structure

  • I have 4 database with same structure. we have to integrate it into single database.All 4 database has same tables. there are some tables having identity key which have same values. How can we merge it.

  • anjani_aim (5/21/2010)


    I have 4 database with same structure. we have to integrate it into single database.All 4 database has same tables. there are some tables having identity key which have same values. How can we merge it.

    that's a huge area of coverage, because there are a LOT of nuances involved. It's not easy, but it's not hard either, you just have to cover all the bases.

    do you have to check for duplicates? could the same data exist in all 4, or is it just manipulating the identities(and their related foreign key children) into a single, unified database?

    i typically add new columns to all the to-be-merged tables to hold the new values to be used for their identities and foreign keys, get the max value for each of those identities from the "master" table, and use row_number to calcualte the new values.

    you might need to break your quesitons up into more detailed, bite sized questions to get anything that is nto a general answer.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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