PATTERNS OF DATA MODELING- P21: Models provide the means for building quality software in a predictable manner. Models let developers think deeply about software and cope with large size and complexity. Developers can think abstractly before becoming enmeshed in the details of writing code. Although models are beneficial, they can be difficult to construct. That is where patterns come in. Patterns provide building blocks that help developers construct models faster and better. | Homomorphism Template 81 Figure Homomorphism Flight model. Normally there is one ActualFlightLeg for a PublishedFlightLeg and departureDate but flight problems can lead to multiple ActualFlightLegs. An AircraftModel is a standard kind of aircraft such as a Boeing 727. An Aircraft is a physical specimen of an AircraftModel and is uniquely identified with its tail number. Figure has three occurrences of the item description template. PublishedFlightLeg to ActualFlightLeg AircraftModel to Aircraft SeatDescription to Seat The example has one homomorphism. AircraftModel to Aircraft corresponds to SeatDescription to Seat. Figure extends the model of Figure and shows another homomorphism. ReportDefinition relates to ReportExecution. ReportDefinitions have Variables each Variable is assigned a Value for a ReportExecution. Figure extends the model of Figure resulting in two homomorphisms one with vehicle and event and the other with event and task. A tune-up is an example of a RepairEventType. The replacement of spark plugs replacing points and setting the timing are examples of RepairTaskType. 82 Chapter 5 Item Description Template Figure Homomorphism Report model. Figure Homomorphism Vehicle model. Chapter Summary The item description template arises when a model relates data and metadata. There is one template for item description and the template frequently occurs. The homomorphism template maps between two Item Description templates and expresses an analogy. The description of item 1 is to item 1 as the description of item 2 is to item 2. The relationship between items connects occurrences. The relationship between descriptions constrains occurrences. There is one template for homomorphism that occasionally occurs. Table summarizes the item description and homomorphism templates. Bibliographic Notes 83 Table Summary of the item description and homomorphism templates Template name Synopsis UML template Use when .