Add database code and dummy model to test it