de-duplicate creation of in-memory db