in-memory database working