- 7,678
- 12,360
Hi All,
My apologies, I think I may have asked this question already, but I could not find it. Here it goes:
I have seen the usage of the word 'relation', specifically a relation between tables but I have not seen a formal definition. From what I understand, tables X,Y are related to each other if some attributes A_X used in X need some of the attributes A_Y in Y in order to be "fully understood" , meaning some attribute A_yi in Y is needed as context to make sense of some attribute A_Xj in X. Formally this is expressed by the fact that an attribute in Y is used as a FK (Foreign Key) in X.
As an example, I guess we could have:
X is "Workers": Worker_Num (PK), Worker_FName, Worker_LName, Worker_DOB and
then Y could be for info on workers:
Work_Info: Work_ID , Work_HourlyPay, Work_Skill (Assuming each has just one skill), Work_Hrsweek (Assuming these are constant), Worker_Num (FK).
Then Y's existence and meaning depend on X. So we say X,Y are related? And this is made formal by the fact that Y contains the FK Worker_Num ?
Is this correct? Is there more/less to it than this?
Thanks.
My apologies, I think I may have asked this question already, but I could not find it. Here it goes:
I have seen the usage of the word 'relation', specifically a relation between tables but I have not seen a formal definition. From what I understand, tables X,Y are related to each other if some attributes A_X used in X need some of the attributes A_Y in Y in order to be "fully understood" , meaning some attribute A_yi in Y is needed as context to make sense of some attribute A_Xj in X. Formally this is expressed by the fact that an attribute in Y is used as a FK (Foreign Key) in X.
As an example, I guess we could have:
X is "Workers": Worker_Num (PK), Worker_FName, Worker_LName, Worker_DOB and
then Y could be for info on workers:
Work_Info: Work_ID , Work_HourlyPay, Work_Skill (Assuming each has just one skill), Work_Hrsweek (Assuming these are constant), Worker_Num (FK).
Then Y's existence and meaning depend on X. So we say X,Y are related? And this is made formal by the fact that Y contains the FK Worker_Num ?
Is this correct? Is there more/less to it than this?
Thanks.