Added helper fn to seperate dbname and path
need to use it in opendb
need to modify all fns in physical.