EXPRESS (data Modeling Language) - Simple Example

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:

    Here we are, we’re alone in the universe, there’s no God, it just seems that it all began by something as simple as sunlight striking on a piece of rock. And here we are. We’ve only got ourselves. Somehow, we’ve just got to make a go of it. We’ve only ourselves.
    John Osborne (b. 1929)

    no thread
    Of cloudy silver sprinkles in your gown
    Its venom of renown, and on your head
    No crown is simpler than the simple hair.
    Wallace Stevens (1879–1955)