Spatial relations between classes as integrity constraints