next up previous contents
Next: Prototype Form Up: Examples of Modal Previous: Can Sally work

Can an employee work in admin and be 34?


An example of existential quantification with modals. This requires that some arbitrary individual be considered in the proposed update so all the appropriate attributes cannot be filled in (they are unknown).

ENG: can an employee work in admin and be 34
SYN: (s(aux(can))(np(det(an))(n(n(employee))))
 PT: $m some(x,`employee:x and `in:`admin:`work:x and `be:`34:x)
FOL: $M exists(x,employee(x)&in(x,`work,`admin)&be(x,`34))
MOD: Entering modal query mode
URC: exists(x,[x,*,*,*]:emp&[x,*,*,`admin]:emp&x=`34)
CHK: Query not meaningful with respect to current database

URC: exists(x,[x,*,*,*]:emp&[x,*,*,`admin]:emp&[x,`34,*,*]:emp)
DRC: exists(x:emp![name],[x,*,*,*]:emp&[x,*,*,`admin]:emp&
OP1: exists(skf1:emp![name],[skf1,*,*,`admin]:emp&[skf1,`34,*,*]:emp)

PAR: is there a consistent database state in which
     an employee is 34 and works in admin

TRC: exists(skf1:emp,exists(tuple1:emp,tuple1!name=skf1!name&
OP2: exists(sk2:emp,exists(sk3:emp,
OP3: exists(sk2:emp,sk2!dept=admin&sk2!age=34)
The following update(s) will bring about the required database state...
<1> Insert into emp : {name=?u1 age=34 sal=?u2 dept=admin}
Do you wish to consider this update (y/n) ?
> y.
Considering update 1 ...
ANS: This is a valid database state

Chris Fox, September 1995