Usage of foreign key as part of composite key or creating a new key (id)? Which one to use when?

35 Views Asked by At

Both are valid, but which one should be used when?

Here's a little example:

Case of AlarmProfileID as prime key

enter image description here

Case of composite key consisting of {username and name}

enter image description here

0

There are 0 best solutions below