cgtalk
September 5th, 2008, 06:26 AM
hi
i was trying to understand something in database design from many decades ( ohh ****.. ami i that old :) )
i was playing with sql server 2005, i have created twp tables. i used the diagram to create a FK relation between two columns
table 1 ---> phoneID
table 2 ---> phoneID
what i understood from the books is that if you create a FK relation between one column and another in two different tables and you update or insert a new value in the primary column , the other column should get the data immediatly.
assume this
table 1 column phoneID has a new value of 3 inserted incremently by insering a data in another column using c# code
now table 2 should insert this ID also but not using a code, it should insert it automatically becouse of the relation that is between the two columns
am i wrong?
i was trying to understand something in database design from many decades ( ohh ****.. ami i that old :) )
i was playing with sql server 2005, i have created twp tables. i used the diagram to create a FK relation between two columns
table 1 ---> phoneID
table 2 ---> phoneID
what i understood from the books is that if you create a FK relation between one column and another in two different tables and you update or insert a new value in the primary column , the other column should get the data immediatly.
assume this
table 1 column phoneID has a new value of 3 inserted incremently by insering a data in another column using c# code
now table 2 should insert this ID also but not using a code, it should insert it automatically becouse of the relation that is between the two columns
am i wrong?