My realization of the active record pattern