Usage of Primary and Foreign keys in an EER diagram
-
29-10-2019 - |
Frage
In my db I have three tables (I have more but for case is equal, users can be companies or single people).
Users
has a primary keyid_user
;Company
has a primary keyid_company
and a foreign keyusers_id_user
;job_offers
has a primary keyid_job_offers
and two foreign keys:company_id_company
andcompany_users_id_user
.
My questions are:
- Does a primary key make sense in
job_offers
? I don't think that there is a reason for it. job_offers
has two foreign keys, one related tocompany
and other tousers
. Is there a problem with this? Does there exist another way to accomplish the same task?
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow