# Querying the Database ## Query Functions ChemRecon provides a number of convenience functions for querying the database. They are all imported into the `.chemrecon.query` module. Querying entries requires providing both an indentifier and an identifier type. For a list of identifier types, see [Identifier Types](/content/identifiertypes). ```{eval-rst} .. automodule:: chemrecon.query :members: :imported-members: ``` ## Advanced Queries with Query Handlers Most common operations of ChemRecon can be performed using the built-in convenience functions described above. These functions query the database using {class}`.QueryHandler` objects. For more advanced functionality, {class}`.QueryHandler`s can be used directly. After connecting, ChemRecon keeps a reference to the active query handler, which can be accessed using {func}`.get_query_handler`. ```{eval-rst} .. autoclass:: chemrecon.QueryHandler ``` Any operations which require modifying the database need to be called from a {class}`.PopulateQueryHandler`. Note that this is only possible on self-hosted databases, not the public database. ```{eval-rst} .. autoclass:: chemrecon.PopulateQueryHandler ```