object GenericDB components: GenericRecord*; operations: AddRecord(GenericDB,GenericRecord)->GenericDB; DelRecord(GenericDB,GenericKey)->GenericDB; UpdateRecord(GenericDB,GenericRecord)->GenericDB; FindRecord(GenericDB,GenericKey)->GenericRecord; description: (* A GenericDB is the parent for more specific databases, which will contain more specific forms of records. *); end GenericDB; object GenericRecord components: key:GenericKey; description: (* A generic record contains only a key field, which will be common to all instances. The key is used to access the record in a GenericDB. *); end GenericRecord; object GenericKey description: (* A generic key is componentless, to be specialized further by its instances. *); end GenericKey; object PersonDB extends GenericDB where: GenericRecord = PersonRecord; GenericKey = PersonId; description: (* A PersonDB is a specialization of GenericDB. Note use of the where attribute, which means that UserRecord replaces all occurrences of GenericRecord in the defintion of GenericDB, and PersonId replaces all occurences of GenericKey. *); end UserDB; object PersonRecord extends GenericRecord components: Name and Address and Age and Sex; description: (* A PersonRecord specializes a GenericRecord by adding appropriate components for Name, etc. *); end UserRecord; object PersonId extends GenericKey = number description: (* A PersonId specializes GenericKey to be a number. In so doing, the access key for a PersonRecord can be some unique numeric id, such as social security number, for example. *); end PersonId;