Implementing a simple ERD in MySQL: is the implementation below 100% compliant with the ERD?
1
vote
1
answer
227
views
**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](https://dba.stackexchange.com/questions/63790/conversion-of-simple-erd-to-table-is-the-solution-below-any-good) .
----------
**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?
Asked by feelthhis
(265 rep)
May 9, 2014, 07:34 AM
Last activity: May 13, 2014, 01:19 PM
Last activity: May 13, 2014, 01:19 PM