Refactor DatabaseView for n-arity products.