save notifications to the database