-
Notifications
You must be signed in to change notification settings - Fork 0
Image
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.
Copyright 2020, 2021, 2022, 2023, 2025 © Leon Starr under MIT Open Source License
- Why they are problematic
- Instance attribute creation values
- Boolean values
- Special values
- Enumerated values
- Action block
- Statement
- Single line action
- Multiple dependent actions on a single line
- An action spread across multiple lines
- A conditional group of single line actions
- Comments
- Finding instances
- Attribute access
- Creation and deletion
- Subclass migration
- Creating a table from a class
- Creating a table with a definition
- Converting a table into a class
- Set operations on tables
- Set comparisons on tables
- Join
- Rename
- Extend
- Aggregation
- Rank
- Image
- Input values
- Signatures and name doubling
- Output values
- Execution order
- Sequential execution
- Conditional execution
- Signals
- Scrall has no for_each action
- Iteration