Complete saving to sqlite database