MODB DATABASE Test Cases with answers
------------------------------------------------------------------
{name | (exists p,q,r,o)(parts(p,name,q,r,o) and r < 20.00) }

ANSWER(NAME:VARCHAR)

Number of tuples = 6
Land Before Time I:
Land Before Time II:
Land Before Time III:
Land Before Time IV:
When Harry Met Sally:
Dirty Harry:
------------------------------------------------------------------
{name,city | (exists e,z,h,o,c,r1,s,p,q,n,a,r2,l) (
             employees(e,name,z,h) and 
             zipcodes(z,city) and
             orders(o,c,e,r1,s) and 
             odetails(o,p,q) and 
             parts(p,n,a,r2,l) and r2 > 20.00 ) }

ANSWER(NAME:VARCHAR,CITY:VARCHAR)

Number of tuples = 2
Jones:Wichita:
Smith:Fort Dodge:
------------------------------------------------------------------
{n1,n2 | (exists m1,s1,m2,s2,z,p1,p2)(customers(n1,m1,s1,z,p1) and
               customers(n2,m2,s2,z,p2) and 
               n1 < n2  ) }

ANSWER(N1:INTEGER,N2:INTEGER)

Number of tuples = 1
1111:2222:
------------------------------------------------------------------
{name | (exists cno,a,b,c)(
        customers(cno,name,a,b,c) and
        not ((exists d,e,f,g,h,i,j,city)(
                orders(d,cno,e,f,g) and employees(e,h,i,j) and
                zipcodes(i,city) and city <> 'Wichita'
            ))
        )
}

ANSWER(NAME:VARCHAR)

Number of tuples = 2
Charles:
Barbara:
------------------------------------------------------------------
{name | (exists cno,a,b,c)(
           customers(cno,name,a,b,c) and
           not ((exists pno,price,d,e,g,u,v,w,x)(
                  parts(pno,d,e,price,g) and
                  price < 20 and
                  customers(cno,u,v,w,x) and
                  not ((exists ono,h,i,j,k)(
                         odetails(ono,pno,h) and
                         orders(ono,cno,i,j,k)
                       ))
               ))
        )
}

ANSWER(NAME:VARCHAR)

Number of tuples = 0
------------------------------------------------------------------
{name | (exists cno,a,b,c)(
         customers(cno,name,a,b,c) and
         not ((exists d,e,f,g)(orders(d,cno,e,f,g)))
        )
}

ANSWER(NAME:VARCHAR)

Number of tuples = 0
------------------------------------------------------------------
{name | (exists cno,a,b,c)(
         customers(cno,name,a,b,c) and
         (exists d,e,f,g,h,i,j,k)(
           orders(d,cno,e,f,g) and
           orders(h,cno,i,j,k) and d<>h) and
           not ((exists d1,e1,f1,g1,d2,e2,f2,g2,d3,e3,f3,g3)(
                  orders(d1,cno,e1,f1,g1) and
                  orders(d2,cno,e2,f2,g2) and
                  orders(d3,cno,e3,f3,g3) and
                  d1<>d2 and d2<>d3 and d1<>d3
               ))
        ) 
} 

ANSWER(NAME:VARCHAR)

Number of tuples = 1
Charles:
------------------------------------------------------------------
{x | numbers(x,x,x,x,x)}

ANSWER(X:INTEGER)

Number of tuples = 2
1:
2:
------------------------------------------------------------------
{x,y | numbers(x,y,x,y,x) }

ANSWER(X:INTEGER,Y:INTEGER)

Number of tuples = 6
1:1:
2:2:
1:2:
2:1:
1:3:
3:1:
------------------------------------------------------------------
{x,y,z | numbers(x,y,z,y,x) }

ANSWER(X:INTEGER,Y:INTEGER,Z:INTEGER)

Number of tuples = 6
1:1:1:
2:2:2:
1:2:1:
2:1:2:
1:3:1:
3:1:3:
------------------------------------------------------------------
{x,y | numbers(x,y,3,y,x) }

ANSWER(X:INTEGER,Y:INTEGER)

Number of tuples = 1
3:1:
------------------------------------------------------------------