Database Administrators Asked on October 28, 2021
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.
Can I use a certain format to show FKs in an EERM Extended Entity-Relationship Model in Chen notation?
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.
Answered by questionto42 on October 28, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP