In this lecture they mentioned 1:1 relationship.
One can represent 1:1 relationship as follows: one lecturer teaches only one subject. It can be done either by adding a subject_id to a lecturer table or by adding a lecturer_id into a subject table.
I have some doubts regarding either the explanation or my understanding.
Lets take the first example with adding a subject_id to a lecturer table.
LECTURE_ID LECTURE_NAME SUBJECT_ID
4 Kolmogorov 6
5 Schmidt 6
So, in fact two lecturers can teach one subject and it is not a 1:1 relation.
Lets take the second example with adding a lecturer_id to a subject table.
SUBJECT_ID SUBJECTE_NAME LECTURER_ID
5 Math 1
6 Arts 1
One lecturer teaches two different subjects.
Is there something I am missing? Or does the foreign key have to appear only once in the table? Because on this page the foreign key (P_id) appeas twice in the "Order" table.