The query manager and database provider for the ORM