next up previous contents
Next: Can Sally work Up: Examples of Modal Previous: Can Edna earn

Can Edna earn 234?


An example which would break constraints on the database due to simple restrictions on table attribute values.

ENG: can edna earn 234
SYN: (s(aux(can))(np(propn(edna)))
 PT: $m `earn:`234:`edna
FOL: $M earn(`edna,`234)
MOD: Entering modal query mode
URC: [`edna,*,`234,*]:emp
DRC: [`edna,*,`234,*]:emp
OP1: [`edna,*,`234,*]:emp

PAR: is there a consistent database state in which edna earns 234

TRC: exists(tuple1:emp,tuple1!name=edna&tuple1!sal=234)
OP2: exists(tuple1:emp,tuple1!name=edna&tuple1!sal=234)
OP3: exists(sk1:emp,sk1!name=edna&sk1!sal=234)
The following update(s) will bring about the required database state...
<1> Modify emp : change {name=edna age=39 sal=2000 dept=shoe} 
                         to {name=edna age=39 sal=234 dept=shoe}
Do you wish to consider this update (y/n) ?
> y.
Considering update 1 ...
ERR: The only legal salaries are 
     850, 1000, 1500, 2000, 2500, 3000, 4000
ANS: This is an illegal database state

Chris Fox, September 1995