Modeling your database with types and attributes