store db in datadir and create if needed