db: define db wrapper as singleton