One polygon can be subtracted from another polygon to create a third polygon formed of the difference. Subtraction is one of a several DK supported basic topological operations. These are: Combine, Union, Intersection, Difference, and Symmetrical Difference (XOR). The DK also supports a powerful, yet easy to manage, mechanism for querying against spatial relationships between two shapes. This mechanism is known as the Dimensionally Extended 9 Intersection Model (DE-9IM).
The idea of the DE-9IM Model is to manage a 9 element mechanism in which each element defines the relationship possibilities between the interiors, exteriors, and boundaries of two shapes. The relationship is defined in terms of intersection types, or lack of an intersection, with the following relationship query possibilities: Equality, Disjoint, Intersect, Touch, Overlap, Cross, Within, Contains.
The DE-9IM Model is explained in detail in the DK Guide.