Implementing a simple ERD in MySQL: is the implementation below 100% compliant with the ERD?
-
02-11-2019 - |
Вопрос
ERD
Consider the following ERD:
Tables
From it, I derived the following tables:
Company
------------------
c_id c_name
------------------
CompanyEmail
------------------
c_id e_id
------------------
Email
------------------
e_id e_addr
------------------
Note: the use of the relationship table (CompanyEmail
) is not arbitrary.
Implementation
From those tables, I made the following implementation (tested in MySQL Workbench 6.1):
- http://pastebin.com/3A0H21kw (please bear with my lack of skills :)
I guess the most important part of it (besides learning the language) was deciding which attribute is FK and the use of CASCADE
. Is it [CASCADE
] the implementation of parcial/strong participation? and/or weak/strong entity?
Question
- Does my implementation accurately complies with the ERD? If not, what would be a better solution?
Нет правильного решения
Не связан с dba.stackexchange