automatic creation of database dir