I'm not sure what will be the best way to ensure participation in the next database project (maybe for SQL Server, Oracle, mySQL, etc.). I have two tables: Factory and worker. I created two rules for design: 1) Each Factory employs at least one (or many) workers. 2) Each worker works exactly one and only one factory.
I created an ERD for design:
[Factory] - || --- rental --- | <- [Worker]
The Factory table is as follows:
Factory_ID (PK) Factory_Name
1 A
2 B
3 C
The WORKER table is as follows:
Worker_ID (PK) Worker_Name Factory_ID (FK)
1 Volume 2
2 Ann 1
3 Jan. 1
Factory_ID (FK), NOT NULL, ( ERD) Factory . , FK ( Factory_ID Worker) null.
: ? Factory ? , factory_id . , Factory # 3 , ERD.
, ?