lazy-open database