How to access the database