Associations Let s add the one to many association between questions and answers Associations have two ends and a direction The source end is named and has type The lower bound of the multiplicity is and the upper bound is also The target end is named and has type The lower bound of the multiplicity is and the upper bound is which means many means that every answer requires a question An optional or nullable property has the multiplicity The syntax is shorthand for means that every question has many answers and that the set of answers is allowed to be empty A non empty set has the multiplicity The syntax is shorthand for Colloquially we call this a one to many relationship Keep in mind that this shorthand is vague It only refers to the upper bounds of the association ends Klass doesn t enforce singular and plural names Take care to use singular names for to one ends and plural names for to many ends The end has the modifier which means that an answer cannot be repointed to a different question In the data layer this means the foreign key is immutable It doesn t mean that the question s text is immutable association QuestionHasAnswer question Question 1 1 final answers Answer 0 * relationship this id Answer questionId question Question 1 1 answers Answer 0 * Question 1 1 0 1 1 1 1 Answer 0 * 1 * * 0 * question final questionId