Throw error if database name is left undefined.