Note: Try this test, and then go to TestYourself answers for Collections to see how you did.
  1. Children of a Parent entity are also known as ____________ of a collection.
  2. True or False. All collections must have a parent entity.
  3. True or False. Root-level entities can form a collection.
  4. True or False. A collection operator must operate on a collection alias.
  5. List three Collection operators and describe what they do.
  6. Which reference contains usage details and examples for every collection operator?
  7. Write a Rule Statement that is equivalent to the syntax Order.total = items.price->sum.
  8. In the syntax in Question 7, which term is the collection alias?
  9. If items is an alias representing the LineItem entities associated with an Order entity, then what would you expect the cardinality of this association to be?
  10. Is Order.lineItem.price->sum an acceptable replacement for the syntax in Question 7? Why or why not?
  11. If you are a Vocabulary designer and want to prevent rule authors from building rules with LineItem.order terms, what can you do to prevent it?
  12. When collection operators are not used in a Rulesheet, aliases are (circle all that apply)
    Optional Mandatory Colorful Convenient
  13. If a nonconditional rule states LineItem.price = 100, and my Input Testsheet contains 7 LineItem entities, then a collection of data is processed by this rule. Is a collection alias required? Why or why not?
  14. Which collection operator is known as the universal quantifier?
  15. Which collection operator is known as the existential quantifier?

    For questions 16-18, refer to the following Vocabulary

  16. Write expressions for each of the following phrases:
    1. If an actor has had more than 3 roles
    2. If a movie has not been released on DVD
    3. If a movie has at least one DVD with deleted scenes
    4. If a movie won at least one Golden Globe
    5. If the movie had more than 15 actors
    6. If there are at least 100 copies available of a movie
    7. If there are less than 2 copies available of a movie
    8. If the DVD can be obtained from more than 1 supplier
  17. Which entities could be grandchildren of Movie?
  18. Which entites could be children of Role?
  19. Describe the difference between ->forAll and ->exists operators.
  20. Describe the difference between ->notEmpty and ->isEmpty operators.
  21. Why are aliases required to represent collections?