fetch namespaces from db