Added DB creation and opening.  (Still todo: closing...)