Results 1 to 2 of 2

Thread: Foreign keys

  1. #1
    Join Date
    Aug 2012

    Foreign keys

    Hi All,

    I'm developing a distributed application, where two users have to connect trough a server. One of them is Master and the other one Slave. In one table I register the Masters Users info, in another one, the Slaves users info. When a Master and a Slave give the permission to get connected, the information is saved in the table ASOCIATION, in order to know who can be connected with who. Then, every time they get connected, the connection information is saved in one new table CONNECTION.

    Both tables have a pair of key fields ID_Master-ID_Slave. My question is, should CONNECTION-ID_MASTER and CONNECTION-ID_SLAVE point to ASOCIATION-ID_MASTER and ASOCIATION-ID_SLAVE (because the connection will be only possible if an association have been established)? Or they should point to the table where the Users info is saved?

    Thanks for your help!

  2. #2
    Join Date
    Jun 2003
    Yes, they should point to the association table.
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts