How to access the database to perform our own commands?