More sqlite interface code