abstracted all view to db data