[improve] Create database reference and add static methods to model.