add implementation of activate and data change in the sql