Extended DB interface and GET request handler

It is now possible to request documents by ID from database.