Reputation: 21
I have the following ER diagrams:
I'm new to ER diagram and I want to add an alert system in banking process. Customer
entity can start a transaction with his/her bank account in transact_with
relationship. In the relationship, there are attributes such as counterpart_name
and counterpart_country
. If counterpart's name in remittance is the same as the name from watch_list
the bank is keeping, the DB creates a new row in the table named Alert
. And I wonder how can I establish that Alert
entity and relationships between other entities.
Since counterpart_name
is a attribute from a relationship, if I want to relate that attribute with watch_list
entity, it seems like it becomes ternary relationship but I don't want watch_list
to be related with customer
and account
entity in normal transaction process. Any suggestions on this, please?
Upvotes: 2
Views: 4844
Reputation: 73542
You can and should relate the ALERT
entity with the entity WATCH_LIST
and TRANSACT_WITH
:
ALERT
is not systematic but conditional, can be documented with an optional relationship.The ER diagrams show the structure of the entities and the relationships. They do not describe the processes or the behaviors. Typically, with an ERD, you'd use some DFD to explain what data is consumed by the monitoring process that would generate the ALERT records. And the IF
would be documented in the flowchart or pseudocode that documents this process. On the other side, nothing prevents you from informally documenting this informally in a comment within your ERD.
Unrelated remarks:
TRANSACT_WITH
, and since a relation is not supposed to have attributes, I understand that it is in reality an associative entity.ALERT
, and express the conditionality in a very precise manner.Upvotes: 0
Reputation: 808
ERD won't help you because it doesn't capture rules. See here: https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model
Of course, if you want to create an ALERT table, then ERD is fine.
The "if" part which fires a trigger (or whatever) could be modeled by a UML sequence diagram (for example).
Put another way, the ALERT table is data, the "if" is control and they are served by different diagram types. Good luck
Upvotes: 2