View Single Post
  #4 (permalink)  
Old June 30th, 2009, 03:18 AM
peace95 peace95 is offline
Friend of Wrox
Points: 793, Level: 10
Points: 793, Level: 10 Points: 793, Level: 10 Points: 793, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2005
Location: OKC, OK, USA.
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts

It would be very helpful for you to show your two tables with the Primary Key(s) and Foreign Key(s) identified. Without seeing the two tables, I am making the suggestion:
  • The ONLY way for two tables to have identical keys, in a RDMS (Relational Database Management System, is for TableA to have a Key identified as the Primary Key i.e. TableA (A_ID PK, Anext). and a TableB(B_ID PK, Bnext, A_ID FK). Note: Primary Key in Table is the Foreign Key in TableB. It is this relationship, 1-to-many, that the Primary Key and Foreign Key constraints will hold true for adds, inserts, updates and Cascade deletes.
Hope this helps. (This is the second attempt of responding to this thread)
Disclaimer: The above comments are solely the opinion of one person and not to be construed as a directive or an incentive to commit fraudulent acts.
Reply With Quote