1

This is a spin-off of the question at How to represent foreign key in an ER diagram? which is too vague about the needed notation.

There the idea of underlining FKs with a dotted line is stated. I also remember this from an exam. I am not sure though, it could have been a double underlining as well, this question is not determined to the dotted line. I have searched a bit, finding that a dotted line represents a weak key attribute.

enter image description here

Source: https://conceptdraw.com/a977c4/p1/preview/640/pict--chen's-erd-design-elements---er-diagram-(chen-notation).png--diagram-flowchart-example.png

Can I use a certain format to show FKs in an EERM Extended Entity-Relationship Model in Chen notation?

4
  • 1
    Does anyone actually use Chen notation in the real world? IDEF1X is far more common, compact, and foreign key relations are readily apparent. Unless someone is holding you hostage, I'd switch.
    – bbaird
    Jul 20 '20 at 14:35
  • 1
    @bbaird Yes, in an exam, on paper :). Else you are right, professional modelling programs use IDEF1X or Crow Foot, “No-Chen“ ER diagrams are more compact and include pk fk relations. Jul 20 '20 at 15:01
  • 1
    So you ARE being held hostage. Sorry, can't be much help.
    – bbaird
    Jul 20 '20 at 15:02
  • :))) @bbaird The course of probably 1000 slides has “evolved over a long time”. At least, the script includes the Extended ER Model where association types can be named, but no mentioning of FKs even there, I have looked it up. Those association types describe the relation with a verb (or perhaps a noun or participle is also allowed as well), but no FK info. I will change the question to the Extended ER Model to be formally exact. Jul 20 '20 at 15:17
1

I think I found the answer, it is more or less not possible and anyway not intended in an ERM. There is a small workaround left in using double underlining.

There is simply no FK to mark in an official ERM. See http://faculty.juniata.edu/rhodes/dbms/ermodel.htm:

E-R Model is not SQL-based. It's not tied to any particular logical implementation of a DBMS. It is a conceptual and semantic model, which attempts to capture meanings rather than an actual implementation.

DO NOT THINK OR START WITH TABLES--YOU WILL BE MISGUIDED ON RELATIONSHIPS AND SOME ATTRIBUTES.

...

Foreign key: term used in relational databases (but not in the E-R model) for an attribute that is the primary key of another table and is used to establish a relationship with that table where it appears as an attribute also.

And in https://en.m.wikipedia.org/wiki/Weak_entity:

In a relational database, a weak entity is an entity that cannot be uniquely identified by its attributes alone; therefore, it must use a foreign key in conjunction with its attributes to create a primary key. The foreign key is typically a primary key of an entity it is related to.

...

An identifying relationship is one where the primary key is populated to the child weak entity as a primary key in that entity.

Thus, the weak key attribute is not equal to a foreign key, it is simply a primary key of another entity needed to reach an entity’s uniqueness (a weak entity is effectively the interim entity that you need to dissolve an M to N relation, using the PKs of “both sides” as attributes; this is out of my course script). Thus the dotted line is not the format for FKs.

Result:

Then, only double underlining remains as an unofficial convention which is up to now used at the university. And mind that showing the FKs is not needed anyway, a named relation implies it and should not explain it, an ERM is not about FKs; do not think in tables.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.