"Database" is such a broad term. I assume you are referring to a relational database system*. In that case, you will need to "map" the domain model to and from the relational model. There are various documented architectural patterns to accomplish this.
A few notable ones are:
- Active Record Pattern
- Table Data Gateway Pattern
- Object-Relational Mapping
That should get you started. Have at look through those and feel free to ask more specific questions.
*Other database systems require different approaches.
“The best thing about a boolean is even if you are wrong, you are only off by a bit.”