Database Reference
In-Depth Information
Box 8.
typedef struct A_FuzzyPred {
NodeTag
type;
char
*pred;
// predicate name
int
minfp;
// support's left bound
int
modminfp;
int
core1;
// core's left bound (included)
int
modcore1;
int
core2;
// core's right bound (included)
int
modcore2;
int
maxfp;
// support's right bound
int
modmaxfp;
int
typefp;
// shape 1(trapz.) 2(increases) 3(decreases)
int
modtypefp;
unsigned int
vno;
// table number
int
vattno;
// relative attribute number
Oid
rorigtab;
Oid
rorigcol;
List
*compfplist;
// compare fuzzy predicate list
List
*modcompfplist;
char
*exprfp;
// fuzzy expression
char
*disd;
// discrete domain
bool
hasfm;
// has fuzzy modificator
char
*fuzzymod;
// fuzzy modificator
int
Mtype;
// modificator type
int
Mpower;
// modificator power
int
normType;
int
vtype;
} A_FuzzyPred;
As we can see in Figure 4, the parser module generates a parser tree composed of: a root node Select-
Stm, a TargelList (projected attributes) and f o r each attribute contained in the clause Select a ResTarget
node that has a pointer to a node Attr , it contains the table name and a pointer to a Value node where is
indicated the name of the attribute. The SelectStmt node also has a fromClause list with a RangeVar node
for each input at the FROM clause, and a pointer to a node RelExpr with the table name, moreover the list
whereClause has a A_Expr node with the name of the operation, this is a subtree with two leaves: lexpr
(left term, in this case attribute “Age”) and rexpr (right term, in this case, A_FuzzyPred node “young”).
Fuzzy Query Tree
Next the parser module of PostgreSQLf transforms the fuzzy parser tree into a Fuzzy Query Tree. The
fuzzy condition is stored at the qualification structure , moreover the list of tables (or subquerys) are
stored at the rtable field as shown in Figure 5.
Search WWH ::




Custom Search