1

I am trying to show the relationship that a java class has with a PHP script. The PHP script gets data from a database and then converts it into JSON format. This is then read by the java file.

In my UML diagram, is there a way to show the relationship between the database and the java class? Should I even bother with this?

1

It depends if this relationship makes sense in the context of your diagram and what the focus is.

It feels to me as if this PHP script acts as a service of some kind (provides access to data the java class cannot get directly from the database) so I would probably model the script as a component on the diagram. A component provides an abstraction of where the data comes from as the java class does not really care about this, it simply sees the script as a provider of a certain kind of data.

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.