Kontakt
stefan.bente[at]th-koeln.de
+49 2261 8196 6367
Discord Server
Prof. Bente Personal Zoom
Adresse
Steinmüllerallee 4
51643 Gummersbach
Gebäude LC4
Raum 1708 (Wegbeschreibung)
Sprechstunde nach Vereinbarung
Terminanfrage: calendly.com Wenn Sie dieses Tool nicht nutzen wollen, schicken Sie eine Mail und ich weise Ihnen einen Termin zu.

Übung »Aggregates bestimmen (am Beispiel der Firma MadMaxRacing)«

In dieser Übung geht es darum, Aggregates zu identifizieren. Dazu nutzen Sie die aus Videos bekannte Checkliste.

Dauer
Ca. 75 min
Video(s) hierzu

Worum geht es?

Die niederländische Firma MadMaxRacing BV hat sich dem Motorsport verschrieben. Sie kümmert sich um spezielle Rennfahrzeuge, die sie verkauft und für die sie weitere Vermittlungsdienste erbringt. Bis jetzt wickelt MadMaxRacing ihr gesamtes Geschäft auf Papier ab. Jetzt soll eine Softwarelösung für ihre Geschäftsprozesse entwickelt werden.

Leistungsbeschreibung der Software (auf Englisch)

A MadMaxRacing admin can add a new rallye car in the company’s software system. A rallye car has a manufacturer (String), a year of construction (Integer), and a suspension travel (Integer). (The other attributes we skip for simplicity). Each vehicle is tuned for ultimate racing power and has one or several turbo(s). A turbo is defined by its size (Integer). Turbos are subject to extreme wear and tear, so they are frequently replaced by new turbos (they are never repaired, just thrown away). For an existing rallye car, the admin is able to switch a turbo, and record this in the software system.

There is the option for buyers to purchase rallye cars from MadMaxRacing. To facilitate purchasing a rallye car, the admin sets up a purchasing agreement between the client (as a buyer) and the seller. The purchasing agreement has a price (Float) and the purchase date (String). There can also be a payment plan as part of the purchasing agreement, containing the monthly amount (Float) and the duration in months (Integer). The details of the payment plan can be changed later. Sometimes even the price in the purchasing agreement is changed later. The seller has a name (String) and a flag if he is commercial (Boolean). The client has a name (String) and a phone number (String). Both seller and client refer to an address with street (String), number (String), zipCode (String), city (String), and state (String).

In addition to purchase a rallye car, clients can also just donate for a rallye car he/she likes. This means that the client pays small monthly amounts of money as a contribution to the maintenance of a rallye car, like in Patreon. For that purpose, a donating agreement with the client is set up, with a monthly donation (Float) and an agreement date (String).

Daraus ergibt sich bei uns folgendes logisches Datenmodell:

CAMS-Domain-Modell

Ihre Aufgabe

Zeichnen Sie die Aggregates im obigen Domain Model ein. Gehen Sie dabei nach der folgenden Checkliste vor (I = inneres Entity, R = Root) - nur wenn alle Bedingungen erfüllt sind, gehören R und I zum selben Aggregate.

  1. I tritt immer zusammen mit R auf. Es gibt keine Query nach I, außer zusammen mit einer Query nach R.
  2. Alle Zugriffe auf I erfolgen via R.
  3. Wenn R gelöscht wird, wird auch I gelöscht.
  4. Es kann Invarianten (immer gültige Bedingungen) in der Beziehung zwischen R und I (und ggfs. weiteren Klassen) geben. (Optionale Bedingung)

Diskutieren Sie das in Ihrer Kleingruppe.

Lösung

Es ergeben sich folgende Aggregates:

CAMS-Domain-Modell