Update to add DB related logics