Multiple possreps initialization
Posted: Sun Sep 12, 2010 7:27 am
Hello. I don't understand how I can create a new type in Rel with multiple possreps. Here is a code example from Date's "Introduction to DB Systems" that I tried to execute in Rel:
The error is:
I don't know how I can make a right initialization. I tried this:
But now I have this error:
Can anyone explain how I should do the right initialization, please?
Code: Select all
TYPE Point POSSREP Cartesian { x RATIONAL, y RATIONAL }
POSSREP Polar { r RATIONAL, o RATIONAL };
ERROR: POSSREP 'Cartesian' has no INITialisation.
I don't know how I can make a right initialization. I tried this:
Code: Select all
TYPE Point POSSREP Cartesian { x RATIONAL, y RATIONAL } POSSREP Polar { r RATIONAL, o RATIONAL } INIT Cartesian ( x := 0.0, y := 0.0 );
ERROR: Component 'y' cannot be assigned because it is set via the selector.
Can anyone explain how I should do the right initialization, please?