mardi 2 décembre 2014

Composite Key for Gizmo Tracking


I'm trying to setup a many to many relationship between an gizmo table and a owner table.



  • A owner can have many gizmos

  • And a gizmo can have many owners


When I have a linking table do I set the gizmoID and ownerID as a composite key and then set the foreign keys on the gizmo table to Identity Auto-Increment by 1 and the same on the owner table or do I set composite key to identity auto-increment.


I am working on sql server 2014 Express and fairly new to this and trying to wrap my head around this.


Thanks for the help in advance.





Aucun commentaire:

Enregistrer un commentaire