SCHEMA example; TYPE date = ARRAY [1:3] OF INTEGER; END_TYPE; TYPE hairType = ENUMERATION OF (blonde, brown, black, red, white); END_TYPE; ENTITY person ABSTRACT SUPERTYPE OF (ONEOF(female, male)); firstName : STRING; lastName : STRING; nickname : OPTIONAL STRING; birthDate : date; children : SET [0:?] OF person; hair : hairType; DERIVE age : INTEGER := years(birthDate); INVERSE parents : SET [0:2] OF person FOR children; END_ENTITY; ENTITY female SUBTYPE OF (person); INVERSE husband : SET [0:1] OF male FOR wife; END_ENTITY; ENTITY male SUBTYPE OF (person); wife : OPTIONAL female; END_ENTITY; FUNCTION years(past : date) : INTEGER; (* This function calculates the number of years between the past date and the current date *) END_FUNCTION; END_SCHEMA;