in a last table, we introduce a few examples. The examples
manipulating database objects use the schema that can be found in
the directory
$EYEDBROOT/examples/common:
// person.odl
enum CivilState {
Lady = 0x10,
Sir = 0x20,
Miss = 0x40
};
class Address {
attribute string street;
attribute string<32> town;
attribute string country;
};
class Person {
attribute string name;
attribute int age;
attribute Address addr;
attribute Address other_addrs[];
attribute CivilState cstate;
attribute Person * spouse inverse Person::spouse;
attribute set<Car *> cars inverse owner;
attribute array<Person *> children;
int change_address(in string street, in string town,
out string oldstreet, out string oldtown);
static int getPersonCount();
index on name;
};
class Car {
attribute string brand;
attribute int num;
Person *owner inverse cars;
};
class Employee extends Person {
attribute long salary;
};