finished the mapping from Object to Database