+ 1
Is it possible to link/reference one foreign key to two values in another table?
Customer: Mobilenumber(PK) Firstname, Lastname Dog: DogID(PK), Owner(FK) Is it possible to link Owner(FK) in table Dog to both Firstname and Lastname in table Customer?
2 odpowiedzi
+ 2
I guess it makes more sense to reference the PK of the Customer table, it is more likely to be unique rather than first or last name. I never heard a foreign key references multiple columns, but maybe I am wrong.
+ 1
You can define an class object, which has several attributes and take an link to that(if there are classes ins sql)