ERD: Mapping 1:N relationship with attributes to relationship schema

1.9k views Asked by At

I've got an assignment to do for which we have to design a database, draw an ERD and then we have to map the diagram to a relational schema. We were also given a list of steps but I'm not sure which one should I apply for the 1:N relationship with attributes, my best bet would be step 4 but I'm not sure what to do with the attributes of the relationship. Does anyone have any idea? :/

I couldn't post images directly because I don't have enough reputation, so I've uploaded them on snag.gy.

My ERD looks like this: http://i.snag.gy/XiFwf.jpg

Information about the database: http://i.snag.gy/OSBq8.jpg

Is there something wrong with my design or cardinality of the relationship? I tried looking for examples on google how to deal with this kind of relationship but I couldn't find anything.

Thanks for your time.

1

There are 1 answers

7
Joe On BEST ANSWER

Chemist to Project is M:M. Works resolves this M:M as a 1:N to the Chemist and Project Entities and therefore becomes an entity/table in its own right. That's where the Hours attribute goes.

Relationships in Chen, per your example, typically become represented as entities and therefore tables. Since relationships can't have attributes themselves in an RDBMS, we use an entity/table to represent the relationship and so the attributes of the relationship becomes attributes/columns in the resulting entity/table.