Create a rule model to match up boys with girls according to these rules:

  1. Age must be within 5 years
  2. Boy must be older than the girl
  3. Location city must be the same
  4. Both must be over 18

Some design options to consider:

Entities

  1. One entity named Person with a gender attribute?
  2. Separate entities for Boy and Girl?
  3. Parent entity Person with Boy and Girl inheriting from the parent

Associations

  1. Associations from Person to Person?
  2. Associations from Boy to Girl?
  3. Separate Match entity with associations to Boy and Girl?

Rules

  1. Limits on number of matches?
  2. Ranking/Scoring of matches?