store apptments in db