Here is the explanation about the SQL Tab for the components view.
The correlation happens on host:port. So if app is using same host and port for connecting to the database, which apmia extension is using for connecting to the database for monitoring, the correlation should happen.