notification and related database refactored