And here's another way to arrive at getting a first relational model. I didn't know what the candidate keys were so i guessed...
[tt]
HERM MODEL:
(Entities)
PERSON = ({id, first_name, last_name},{id})
CLIENT = ({client_name},{client_name})
PUBLICATION = ({pub_name,pub_date},{pub_name,pub_date})
(Relations)
EDITOR = ({PERSON, PUBLICATION},{begin_date, end_date},{PERSON, begin_date})
CONTACT = ({PERSON, CLIENT},job_title,{CLIENT})
WRITER = ({PERSON,ARTICLE},NULL,{ARTICLE})
COVER = ({CLIENT,ARTICLE},NULL,{ARTICLE})
ARTICLE = ({PUBLICATION, WRITER},{title},{PUBLICATION,title})
KEYWORD = ({ARTICLE},{word},{ARTICLE, word})
RELATIONAL MODEL:
(Entities)
PERSON' = {id, first_name, last_name}
with minimal key {id}
CLIENT' = {client_name}
with minimal key {client_name}
PUBLICATION' = {pub_name, pub_date}
minimal key {pub_name, pub_date}
(Relations)
EDITOR' = {id, pub_name, pub_date, begin_date, end_date}
with minimal {id}
FK's [id] [⊆] PERSON'[id]
[pub_name,pub_date] [⊆] PUBLICATION'[pub_name,pub_date]
CONTACT' = {id, client_name, job_title}
with minimal key {client_name}
FK's [id] [⊆] PERSON'[id]
[client_name] [⊆] CLIENT'[client_name]
WRITER' = {pub_name, pub_date, title, id }
with minimal key {title, pub_name, pub_date}
FK's [pub_name, pub_date, title] [⊆] ARTICLE'[pub_name, pub_date, title]
[id] [⊆] PERSON'[id]
COVER' = {pub_name, pub_date, title, client_name}
with minimal key {pub_name, pub_date, title, client_name}
FK's [pub_name, pub_date, title] [⊆] ARTICLE'[pub_name, pub_date, title]
[client_name] [⊆] CLIENT'[client_name]
ARTICLE' = {pub_name, pub_date, title}
with minimal key {pub_name, pub_date, title}
FK's [pub_name, pub_date] [⊆] PUBLICATION'[pub_name, pub_date]
KEYWORD' = {pub_name, pub_date, title, word}
with minimal key {pub_name, pub_date, title, word}
FK's [pub_name, pub_date, title] [⊆] ARTICLE'[pub_name, pub_date, title]
[/tt]
For example,
- A PERSON is an EDITOR for a PUBLICATION
- A PERSON is a WRITER of one for more ARTICLES
- A PERSON is a CONTACT for a CLIENT.