Implement previous and next component on db model