Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
da_nootje
Starting Member
2 Posts |
Posted - 2010-02-03 : 04:21:48
|
Hello,i have a question about conversion from db1 to db2.I made insert into select query's to insert data into db2 fromdb1. In a few table i put the old PK field, so it's better to make relation between different tables.I didn't do that for my Domain Tables. Now they have asked me, why i did that and why it isn't necessary to make extra column in the new Domain tables?Sorry for my worse English, hopefully someone can help me.Gr Dennis |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-03 : 04:24:15
|
sorry you're not clear. are you telling about preserving same value of pk while moving data to db2? |
|
|
da_nootje
Starting Member
2 Posts |
Posted - 2010-02-03 : 04:41:52
|
Oke sorry,here explanation of the new situation.DB1Table: ProjectPK: prj_Code (wwb_001, trend_01 etc etc)Name: WorldWideBakers, Trendy, etc etcContact_Person: 1, 2Table: PersonPK prs_code (1,2)Name: Dennis, MikeDB2Table: projectPK: project_id (1, 2, 3, 4)Name: WorldWideBakers, Trendy, etc etcFK: person_id (8,9)DB1_prj_Code: wwb_001, trend_01 etc etcTable: PersonPK: Person_Id (8,9)Name: Dennis, MikeDB1_prs_Person: 1,2DB1_... is the extra column with the PK field from the old database.It was necessary to insert those extra columns to make a good relation between the different tables.But why is it necessary en why isn't it necessary to do it with domain tables.It's a little bit difficult for me to explain it.Gr Dennis |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-03 : 06:25:56
|
i really didnt understand what you mean by domain tables.You need to have a column containing pk values from other db as long as you need to maintain relation between them |
|
|
|
|
|
|
|