When looking at relationships between entities there are three parts
How the entities are linked. A Primary Key is Linked to a Foreign Key (shown by a line between the entities)
How they are related ( e.g., a student can be in 1 or MANY classes). This is referred to as the Cardinality.
And based on the cardinality any integrity constraints ( e.g., A student and course must exist before they can be enroled in a course)
To illustrate this we draw the entities and show how they are related.
Relationships can be:
-0I- , zero or 1
-II-, 1 and only 1 (must be 1)
-0<-, 0, 1 or many
-|<, 1 or many (must be at least 1)
This is referred to as the Cardinality.
Based on the relationship rules we can create an ERD that shows how the entities are related.
There are two parts, how the entities are linked (shown by a line between the entities) and how they are related ( e.g., a student can be in 1 or MANY classes). This is referred to as the Cardinality.
Question:
Library scenario sample answer (Figure 1) , does it matter what order the entities are placed i.e. tblFine is showing first could tblBorrower have come first or is it really about how they connect to one another in terms of positioning i.e. tblBooks connects to tblBorrower hence it goes in the middle ?
Answer
It doesn't matter the order but when drawing a ERD or E-ERD try to make sure the relationships do not overlap over each other. If they overlap this can often point to an issue with your relationships. And yes it is important that they are shown in relation to how they connect. In this case you could do a mirror as in
tblBooks -||-----o< tblLoan >o---||- tblBorrower -||---o<tblFine
It is also good to try to connect the relationship lines to the actual attributes as well (e.g. tblFine.BorrID to tblBorrowed.BorrID)
You could have tblFine below tblBorrower but try to keep the relationship lines clean. (Figure 2)