Defining Collections and Relations

Objective

After completing this lesson, you will be able to Discover ways to differentiate between a Collection and a Relation to define multivalue attributes in the SAP Commerce Type System.

Collections and Relations

Since we have learned about the SAP Commerce Type System and the items.xml file, it’s useful to extend your understanding of two generic types: collection and relations. They can be used to support multivalue attributes.

  • Collections can contain multiple elements of the same type and are appropriate when the number of elements is minimal.
  • Relations offer better performance, and allow you to model one-to-many, many-to-one, and many-to-many relationships.

Let’s discover more in the following video.

Log in to track your progress & complete quizzes