Modeling the database