Based on your comment, it seems that this ** enclosed fields are being treated specially by SFDC. So you can't access that data as easy as you do in your Apex code. When you're developing using Apex it handles many such underlying stuff for you automatically. In Java and PostgreSQL, you have much more flexibility (due to working in a lower layer and less abstraction) but of course you will lose such fancy features. It's a trade-off. If the data you're talking about is being stored in postgresql, then they're definitely tables and there is no way other than querying them directly by joining multiple tables. My guess is that in its simplest form, it would be something like this (it's just an example):
SELECT c.id, c.name, ac.name
FROM contact c
JOIN account ac ON c.account_id = ac.id;
The problem is that your code would be definitely coupled with the way your data is being model in SFDC on the database layer. So if they change something via other tools, then your code stops working. I'm not familiar with this SFDC and Apex thing, if the data model design is being done by you, then it worth thinking about doing it this way, otherwise it's more future-proof to stick to a single solution/framework/tool and let it handle all underlying stuff.
EDIT:
Considering your comment regarding the store --> account --> contact relationship, then your query would be something like this:
SELECT c.id, c.name, ac.name, st.city
FROM store st join account ac on ac.store_id = st.id
JOIN contact c on c.accountid = ac.id