How to access db in particular path using appium in iOS devices

Start application.
Get username from the user.
Check whether the username is same as the user name present in the db.

This flow might be achieved with regular java code with no relation to appium

Database is sqlite.
Will we be able to connect to database check whether the entry is present?
Please can you attach sample code if you haveā€¦

In case and you use java_client then try here