{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


2 invert the view de nitions so they are edb

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: gic to get rid of existential variables. 2. Invert the view de nitions, so they are EDB predicates with function symbols de ned in terms of a view. 3 Remember that the EDB" predicates are really global, abstract concepts as in IM, not stored relations. Example To invert the view v1X,Y :- parX,Z & parZ,Y 1 we get: parX,fX,Y :- v1X,Y parfX,Y,Y :- v1X,Y Notice that :- is a misnomer as far as the view de nition is concerned, but in the inverse rules it is simply an assertion that there are no bogus facts in the view. A More Complex Example Suppose we have EDB predicates global concepts f X; Y  and mX; Y , meaning that Y is the father or mother, respectively, of X . Our query is to nd all maternal ancestors" of an individual X , i.e., all females who are ancestors: r1: mancX,Y :- mX,Y r2: mancX,Y :- fX,Z & mancZ,Y r3: mancX,Y :- mX,Z & mancZ,Y The available views are: v1X,Y :- fX,Z & mZ,Y v2X,Y :- mX,Y Invert the Views r4: fX,gX,Y :- v1 X,Y r5: mgX,Y,Y :- v1 X,Y r6: mX,Y :- v2...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online