I am currently studying functional dependencies and struggling to understand what is behind them.
Let's say I have a table:
Customer
|-----------|--------------|------------|------------------|------------------| |Cust-ID | Cust-FName |Cust-LName |Cust-Email |Cust-Pw | |-----------|--------------|------------|------------------|------------------| |1 |John |Smith | jsmith@email.com |srt6564sdgjhy55y | |2 |Adam |Borneo | adb@hotmail.com |45657ythjdfgqAfd | -------------------------------------------------------------------------------
There are two candidate keys: cust-ID and cust-Email (only one email address can belong to one client). Choosing cust-ID as PK will be the only functional dependency:
{Cust-ID} -> {Cust-FName, Cust-LName, Cust-Email, Cust-Pw} ?
Or, I would draw / imagine both candidate keys:
{Cust-ID} -> {Cust-FName, Cust-LName, Cust-Email, Cust-Pw}
{Cust-Email} -> {Cust-ID, Cust-FName, Cust-LName, Cust-Pw} ?
Instincts tell me that the first, but given that this is a completely new topic, I would appreciate any help!
source share