Monday, June 22, 2020

Answer for Relationships between Tables in SQL

https://365datascience.com/dwqa-answer/answer-for-relationships-between-tables-in-sql/ -

Hi Gilles!

Thanks for reaching out.

Yes, a table can have only one primary key. And this key can be composed either by a single column (e.g. customer_id), or by several columns, in which case it will be called a composite primary key. In that case, the uniqueness of the key will not be defined by the value of a single column, but by the combination of the values of several columns. 

As an example of a composite primary key can be considered the combination of the playing card suit (Diamonds, Spades, Clubs, Hearts) and the playing card value (2, 3, 4, …, Jack, Queen, Kind, Ace). Neither the suit nor the value are sufficient to identify a unique value for the playing card. But in combination, the suit and the value can.

Hope this helps.
Best,
Martin

 




#365datascience #DataScience #data #science #365datascience #BigData #tutorial #infographic #career #salary #education #howto #scientist #engineer #course #engineer #MachineLearning #machine #learning #certificate #udemy

No comments:

Post a Comment