persist the data to sqlite