1. NEED TO GO THROUGH A FILTER. Company[ Department(@dName [KEY]=x1,@dNumber [KEY]=x2)[ Location(@locationName=x3), WorksFor[ Employee(@ssn=x4,@bdate=x5,@address=x6,@sex=x7,@salary=x8){functional}[ Name(@fname=x9,@lname=x10){functional}, DependentOf[ Dependent(@dependName=x11,@dependSex=x12,@dependBdate=x13,@relationship=x14){functional}], Supervision(@sssn=x15)]]]] :- Name(Y1),Department(Y2),Employee(Y3), Dependent(Y4),Employee(Y5),Location(Y6), locations(Y2,Y6),worksFor(Y3,Y2),ename(Y3,Y1), dependentsOf(Y4,Y3),INV(supervision)(Y5,Y3),fname(Y1,x9), dnumber(Y2,x2),sex(Y3,x7),lname(Y1,x10), bdate(Y3,x5),depRelationship(Y4,x14),dependentName(Y4,x11), ssn(Y3,x4),address(Y3,x6),salary(Y3,x8), dname(Y2,x1),depBdate(Y4,x13),ssn(Y5,x15), locationName(Y6,x3),depSex(Y4,x12). 2. NEED TO GO THROUGH A FILTER. Company[ Department(@dName [KEY]=x1,@dNumber [KEY]=x2)[ Location(@locationName=x3), WorksFor[ Employee(@ssn=x4,@bdate=x5,@address=x6,@sex=x7,@salary=x8){functional}[ Name(@fname=x9,@lname=x10){functional}, DependentOf[ Dependent(@dependName=x11,@dependSex=x12,@dependBdate=x13,@relationship=x14){functional}], Supervision(@sssn=x15)]]]] :- Name(Y1),Department(Y2),Employee(Y3), Dependent(Y4),Employee(Y5),Location(Y6), Manages(Y7),locations(Y2,Y6),departmentManaged(Y7,Y2), manager(Y3,Y7),ename(Y3,Y1),dependentsOf(Y4,Y3), INV(supervision)(Y5,Y3),fname(Y1,x9),dnumber(Y2,x2), sex(Y3,x7),lname(Y1,x10),bdate(Y3,x5), depRelationship(Y4,x14),dependentName(Y4,x11),ssn(Y3,x4), address(Y3,x6),salary(Y3,x8),dname(Y2,x1), depBdate(Y4,x13),ssn(Y5,x15),locationName(Y6,x3), depSex(Y4,x12). 3. NEED TO GO THROUGH A FILTER. Company[ Department(@dName [KEY]=x1,@dNumber [KEY]=x2)[ Location(@locationName=x3), WorksFor[ Employee(@ssn=x4,@bdate=x5,@address=x6,@sex=x7,@salary=x8){functional}[ Name(@fname=x9,@lname=x10){functional}, DependentOf[ Dependent(@dependName=x11,@dependSex=x12,@dependBdate=x13,@relationship=x14){functional}], Supervision(@sssn=x15)]]]] :- Name(Y1),Department(Y2),Employee(Y3), Dependent(Y4),Employee(Y5),Location(Y6), locations(Y2,Y6),worksFor(Y3,Y2),ename(Y3,Y1), dependentsOf(Y4,Y3),supervision(Y3,Y5),fname(Y1,x9), dnumber(Y2,x2),sex(Y3,x7),lname(Y1,x10), bdate(Y3,x5),depRelationship(Y4,x14),dependentName(Y4,x11), ssn(Y3,x4),address(Y3,x6),salary(Y3,x8), dname(Y2,x1),depBdate(Y4,x13),ssn(Y5,x15), locationName(Y6,x3),depSex(Y4,x12). 4. NEED TO GO THROUGH A FILTER. Company[ Department(@dName [KEY]=x1,@dNumber [KEY]=x2)[ Location(@locationName=x3), WorksFor[ Employee(@ssn=x4,@bdate=x5,@address=x6,@sex=x7,@salary=x8){functional}[ Name(@fname=x9,@lname=x10){functional}, DependentOf[ Dependent(@dependName=x11,@dependSex=x12,@dependBdate=x13,@relationship=x14){functional}], Supervision(@sssn=x15)]]]] :- Name(Y1),Department(Y2),Employee(Y3), Dependent(Y4),Employee(Y5),Location(Y6), Manages(Y7),locations(Y2,Y6),departmentManaged(Y7,Y2), manager(Y3,Y7),ename(Y3,Y1),dependentsOf(Y4,Y3), supervision(Y3,Y5),fname(Y1,x9),dnumber(Y2,x2), sex(Y3,x7),lname(Y1,x10),bdate(Y3,x5), depRelationship(Y4,x14),dependentName(Y4,x11),ssn(Y3,x4), address(Y3,x6),salary(Y3,x8),dname(Y2,x1), depBdate(Y4,x13),ssn(Y5,x15),locationName(Y6,x3), depSex(Y4,x12). 5. NEED TO GO THROUGH A FILTER. Company[ Department(@dName [KEY]=x1,@dNumber [KEY]=x2)[ Location(@locationName=x3), WorksFor[ Employee(@ssn=x4,@bdate=x5,@address=x6,@sex=x7,@salary=x8){functional}[ Name(@fname=x9,@lname=x10){functional}, DependentOf[ Dependent(@dependName=x11,@dependSex=x12,@dependBdate=x13,@relationship=x14){functional}], Supervision(@sssn=x15)]]]] :- Name(Y1),Department(Y2),Employee(Y3), Dependent(Y4),Employee(Y5),Location(Y6), Manages(Y7),locations(Y2,Y6),worksFor(Y3,Y2), ename(Y3,Y1),dependentsOf(Y4,Y3),manager(Y3,Y7), manager(Y5,Y7),fname(Y1,x9),dnumber(Y2,x2), sex(Y3,x7),lname(Y1,x10),bdate(Y3,x5), depRelationship(Y4,x14),dependentName(Y4,x11),ssn(Y3,x4), address(Y3,x6),salary(Y3,x8),dname(Y2,x1), depBdate(Y4,x13),ssn(Y5,x15),locationName(Y6,x3), depSex(Y4,x12). 6. NEED TO GO THROUGH A FILTER. Company[ Department(@dName [KEY]=x1,@dNumber [KEY]=x2)[ Location(@locationName=x3), WorksFor[ Employee(@ssn=x4,@bdate=x5,@address=x6,@sex=x7,@salary=x8){functional}[ Name(@fname=x9,@lname=x10){functional}, DependentOf[ Dependent(@dependName=x11,@dependSex=x12,@dependBdate=x13,@relationship=x14){functional}], Supervision(@sssn=x15)]]]] :- Name(Y1),Department(Y2),Employee(Y3), Dependent(Y4),Employee(Y5),Location(Y6), Manages(Y7),locations(Y2,Y6),departmentManaged(Y7,Y2), manager(Y3,Y7),ename(Y3,Y1),dependentsOf(Y4,Y3), manager(Y5,Y7),fname(Y1,x9),dnumber(Y2,x2), sex(Y3,x7),lname(Y1,x10),bdate(Y3,x5), depRelationship(Y4,x14),dependentName(Y4,x11),ssn(Y3,x4), address(Y3,x6),salary(Y3,x8),dname(Y2,x1), depBdate(Y4,x13),ssn(Y5,x15),locationName(Y6,x3), depSex(Y4,x12). 7. NEED TO GO THROUGH A FILTER. Company[ Department(@dName [KEY]=x1,@dNumber [KEY]=x2)[ Location(@locationName=x3), WorksFor[ Employee(@ssn=x4,@bdate=x5,@address=x6,@sex=x7,@salary=x8){functional}[ Name(@fname=x9,@lname=x10){functional}, DependentOf[ Dependent(@dependName=x11,@dependSex=x12,@dependBdate=x13,@relationship=x14){functional}], Supervision(@sssn=x15)]]]] :- Name(Y1),Department(Y2),Employee(Y3), Dependent(Y4),Employee(Y5),Location(Y6), WorksOn(Y7),locations(Y2,Y6),worksFor(Y3,Y2), ename(Y3,Y1),dependentsOf(Y4,Y3),worker(Y7,Y3), worker(Y7,Y5),fname(Y1,x9),dnumber(Y2,x2), sex(Y3,x7),lname(Y1,x10),bdate(Y3,x5), depRelationship(Y4,x14),dependentName(Y4,x11),ssn(Y3,x4), address(Y3,x6),salary(Y3,x8),dname(Y2,x1), depBdate(Y4,x13),ssn(Y5,x15),locationName(Y6,x3), depSex(Y4,x12). 8. NEED TO GO THROUGH A FILTER. Company[ Department(@dName [KEY]=x1,@dNumber [KEY]=x2)[ Location(@locationName=x3), WorksFor[ Employee(@ssn=x4,@bdate=x5,@address=x6,@sex=x7,@salary=x8){functional}[ Name(@fname=x9,@lname=x10){functional}, DependentOf[ Dependent(@dependName=x11,@dependSex=x12,@dependBdate=x13,@relationship=x14){functional}], Supervision(@sssn=x15)]]]] :- Name(Y1),Department(Y2),Employee(Y3), Dependent(Y4),Employee(Y5),Location(Y6), Manages(Y7),WorksOn(Y8),locations(Y2,Y6), departmentManaged(Y7,Y2),manager(Y3,Y7),ename(Y3,Y1), dependentsOf(Y4,Y3),worker(Y8,Y3),worker(Y8,Y5), fname(Y1,x9),dnumber(Y2,x2),sex(Y3,x7), lname(Y1,x10),bdate(Y3,x5),depRelationship(Y4,x14), dependentName(Y4,x11),ssn(Y3,x4),address(Y3,x6), salary(Y3,x8),dname(Y2,x1),depBdate(Y4,x13), ssn(Y5,x15),locationName(Y6,x3),depSex(Y4,x12).