Adding some database query support

Lacking other commits I wanted to get some way to search the database,
so I'm adding these files from my branch.
Added the other files
Finished adding database query support.

Added a simple working way to search for identifiers in the database.
This should be overwritten or added to by the actual database search,
these three commits are just to get things working.