Simple Example
A simple EXPRESS data model looks like fig 2, and the code like this:
SCHEMA Family; ENTITY Person ABSTRACT SUPERTYPE OF (ONEOF (Male, Female)); name: STRING; mother: OPTIONAL Female; father: OPTIONAL Male; END_ENTITY; ENTITY Female SUBTYPE OF (Person); END_ENTITY; ENTITY Male SUBTYPE of (Person); END_ENTITY; END_SCHEMA;The data model is enclosed within the EXPRESS schema Family. It contains a supertype entity Person with the two subtypes Male and Female. Since Person is declared to be ABSTRACT only occurrences of either (ONEOF) the subtype Male or Female can exist. Every occurrence of a person has a mandatory name attribute and optionally attributes mother and father. There is a fixed style of reading for attributes of some entity type:
- a Female can play the role of mother for a Person
- a Male can play the role of father for a Person
Read more about this topic: EXPRESS (data Modeling Language)
Famous quotes containing the word simple:
“Well, I had gone and spoiled it again, made another mistake. A double one in fact. There were plenty of ways to get rid of that officer by some simple and plausible device, but no, I must pick out a picturesque one; it is the crying defect of my character.”
—Mark Twain [Samuel Langhorne Clemens] (18351910)
“Literary gentlemen, editors, and critics think that they know how to write, because they have studied grammar and rhetoric; but they are egregiously mistaken. The art of composition is as simple as the discharge of a bullet from a rifle, and its masterpieces imply an infinitely greater force behind them.”
—Henry David Thoreau (18171862)