No problems. Yes there is a way to get that information from the database - everything is stored in the database after all :)
The linkage between pages/components/menus and the portal isn't as simple. The table you'll need is PSPRSMDEFN which is the portal registry structure definition table. It stores the hierarchical structure of the portal as a table, making it a bit more complicated to understand. This table doesn't follow the conventions of the menu structure beyond the menu name. So things like the bar item aren't relevant. In PeopleTools 8+ menus are used purely for security, and navigation is replaced by the portal which causes some confusion!
As the portal is a tree structure, each entry in the table has a parent (except for the portals themselves), and the top most nodes (e.g. PeopleTools - PT_PEOPLETOOLS) have PORTAL_ROOT_OBJECT as their parents. The portals themselves are things like EMPLOYEE, CUSTOMER, MOBILE) etc.
HRMS uses the EMPLOYEE portal which you can see at the start of all your URLs as http://server:port/psp/ps/EMPLOYEE etc. Also, each portal entry can either be a folder or a content reference. This is termed as the content type. To simplify, think of folders as containers and content references as links to things.
To get a better idea of the structure of the portal, go to:
PeopleTools > Portal > Structure and Content
This is the adminstration interface to the portal structure.
Any way, that's just a bit of background. Getting back to your question, to get the portal label you'll need to know the menu name (e.g. ADMINISTER_WORKFORCE_(GBL) and the component name). For example, if you wanted to get the portal label for the Job Data component you need to know the menu name (ADMINISTER_WORKFORCE_(GBL)) and the component name (JOB_DATA) which you can get using CTRL + J.
In the earlier post about getting the item label, note that the PSPNLGROUP table includes the component name as the field PNLGRPNAME. So you should be able to get the menu and component in your query which you can then use to link to the PSPRSMDEFN table.
So here's a quick example of a query to get all the portal labels for content references under the ADMINISTER_WORKFORCE_(GBL) menu:
select
PORTAL_OBJNAME,
PORTAL_LABEL,
PORTAL_URI_SEG1 as MENUNAME,
PORTAL_URI_SEG2 as COMPONENT
from
PSPRSMDEFN
where
PORTAL_NAME = 'EMPLOYEE'
and PORTAL_REFTYPE = 'C'
and PORTAL_URI_SEG1 = 'ADMINISTER_WORKFORCE_(GBL)'
and PORTAL_LABEL <> ' '
order by PORTAL_LABEL;
You'll notice that to link to menu name you use the field PORTAL_URI_SEG1 and to link to component you use the field PORTAL_URI_SEG2 which I've aliased in the query as MENUNAME and COMPONENT to make it clear.
Since you are working in the EMPLOYEE portal and you want content references (actual links to components) as opposed to folders which are just containers (e.g. Job Information), you need to specify the content type as C. You also want to exclude any items with a blank portal label.
I know this is a lot of information, but hopefully it makes some sense and answers your question. Good luck.