Question

I'm not sure how the following is an unsafe query. "Unsafe query" means that the answer set is infinite. I seek an explanation of why it is an unsafe query because I don't understand the query.

There are 2 tables:

invoice

number(PK)    customer   date         amount
12343         121        24/4/11      123455
23432         234        1/3/11       3234
23456         121        12/4/11      12540
67891         121        1/4/11       1432
19473         234        11/12/11     555

customer

code(PK)    name     address
121         a        ab
234         b        bc
233         c        cd
122         d        de

The query is:

{< X1, Z2 > |
    ƎY1, ƎZ1, ∀X2, ∀V2 (
            customer(X1, Y1, Z1)
        ᴧ  (invoice(X2, X1, Z2, V2) --> Z2 >= '1/4/11')
    )
}

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top