Skip to content
Leon Starr edited this page Sep 5, 2021 · 2 revisions

The image operation is best explained in C.J. Date’s book: Relational Theory for Computer Professionals, Chapter 5. It eliminates the need for a summarize operation.

Borrowing with a few stylistic adjustments, here are C.J. Date’s case study tables for reference:

And here is the corresponding class diagram:

The image of Supplier number S4 in Shipment would be:

Which is equivalent to:

imageS4 #= Shipment(Supplier : s4).(-Supplier)

To see how the image operation is useful, we use it to find all Suppliers that ship all Parts using the !! image operation:

ships all the parts #=
    Supplier[Number >> Supplier](!!Shipment.Part number : Part.Part number )

So first we rename the Supplier table so that its Number attribute matches the Shipment.Supplier attribute.

Then we take the image of each Supplier row in the Shipment table projecting only on Part number. This gives us a one column table of distinct shipped Part numbers. We match this against the set of all Parts which is just the Part table projected on Part number.

Introduction

Model semantics

Flows (as Variables)

Constants and literals

Structure of an activity

Accessing the class model

Data flow


Grammar and parsing notes

Components

Clone this wiki locally