ORM
UoDs
Examples
from the Real World
Databases
(or potential ones) are all around us. ORM requires us to look critically
at sections of the real world and extract the underlying FACT TYPES that
could be used to describe that information. We do this by first writing
ELEMENTARY SENTENCES.
An elementary
sentence is a FACT TYPE with embedded data - for example:
Person(pid)42
scored Rating(achievement code)"HA"
in Subject(subject code)"Ec"
where:
Entity/Object Types |
Person, Rating and Subject |
Reference Modes |
pid, achievement code and subject code |
role |
... scored ... in ... |
Example data |
42, "HA" and "EC" |
An Elementary sentence
is one that cannot be broken down further into simpler ones without
the loss of important information.
In the above sentence,
if we decomposed it into 2 simpler (binary) sentences:
Person(pid) scored
Rating(achievement code)
Person(pid) studies Subject(subject code)
We lose the relationship
between a student and the achievement in that particular subject.
Examine the following
real-world examples and try to write ELEMENTARY SENTENCES for
them.
|