Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arrow direction for fetching data from database in architecture diagram?

In creating an architecture diagram, if you will just fetch data from the database and not write to it, where should the arrow point? I was thinking, it should be bidirectional since the app request from the database and the data is returned to the app. Or it should just be from the the DB towards the app even though the database cannot make an action on its own?

enter image description here

like image 547
Jiji Avatar asked Nov 29 '25 19:11

Jiji


1 Answers

AFAIK, there are no well defined rules around the way we should build our diagrams, the most important thing is to be descriptive enough to be easily understood by the people who need to read them.

It's true that the DB cannot initiate a connection on its own (it responds to requests coming from the app), but usually in an architecture diagram you want to highlight the data flow, and not necessarily the component who initiates the connection.

If the app is only writing data to the DB, I would prefer to make an arrow that points towards the DB, illustrating the direction where the data is flowing. If you're only reading, then I would make the arrow pointing towards the app (and bidirectional if you do both operations).

At the end of the day, the most important thing is to be consistent throughout the diagram. You can add a note somewhere to explicitly say the general meaning of an arrow.

like image 131
Cosmin Ioniță Avatar answered Dec 01 '25 16:12

Cosmin Ioniță



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!