I'm unclear on what you are asking exactly.
HQ uses a database to house all its information. By default, the database used is a PostgreSQL database built-in to the standard installation. Stand-alone PostgreSQL and Oracle databases (for instance, on a remote box) can also be used for larger installations. Queries can be run against the database to pull interesting information out for specific purposes.
Perhaps a better, and more specific answer can be provided if you can detail exactly what you are trying to accomplish.