We have developed a FSQL Server for a Fuzzy Relational Database (FRDB). The FSQL language (Fuzzy SQL) is an extension of the SQL language that allows us to write flexible conditions in our queries. This Server has been depeloped for Oracle, following the model GEFRED, a theoric model for FRDB that includes fuzzy attributes to store vague information in the tables. The FSQL Server allows us to make flexible queries about traditional (crisp) or fuzzy attributes and we can use linguistic labels defined on any attribute.
The FSQL language extends the SQL language to allow flexible queries. We have extended the SELECT command in order for it to express flexible queries and, due to its complex format, we only show here an abstract with the main extensions to this command:
Comparator for Possibility | Comparator for Necessity | Significance |
---|---|---|
FEQ or F= | NFEQ or NF= | Fuzzy EQual (Possibly/Necessarily Equal) |
FDIF, F!= or F<> | NFDIF, NF!= or NF<> | Fuzzy DIFferent |
FGT or F> | NFGT of NF> | Fuzzy Greater Than |
FGEQ or F>= | NFGEQ or NF>= | Fuzzy Greater or Equal |
FLT or F< | NFLT or NF< | Fuzzy Less Than |
FLEQ or F<= | NFLEQ or NF<= | Fuzzy Less or Equal |
MGT or F>> | NMGT or NF>> | Much Greater Than |
MLT or F<< | NMLT or NF<< | Much Less Than |
Possibility comparators are more general than necessity comparators are. Then, necessity comparators retrieve less tuples and these comply with the conditions necessarily.
Example: Give me all persons with fair hair (in minimum degree 0.5) that they are possibly taller than label $Tall (in minimum degree 0.8):
SELECT | * FROM Person |
WHERE | Hair FEQ $Fair THOLD 0.5 AND |
Height FGT $Tall THOLD 0.8 |
If the argument of the function CDEG is an attribute, then the function CDEG only uses the conditions that includes that attribute. We can use CDEG(*) to obtain the fulfilment degree of each tuple (with all of its attributes, not just one of them) in the condition.
Fuzzy Constant | Significance |
---|---|
UNKNOWN | Unknown value but the attribute is applicable |
UNDEFINED | The attribute is not applicable or it is meaningless |
NULL | Total ignorance: We know nothing about it |
$[a,b,c,d] | Fuzzy trapezium (a<=b<=c<=d) |
$label | Linguistic Label: It may be a trapezium or a scalar (defined in FMB). |
[n,m] | Interval "Between n and m" (a=b=n and c=d=m). |
#n | Fuzzy value "Approximately n" (b=c=n and n-a=d-n=margin). |
Fuzzy Constant | Significance |
---|---|
$[a,b,c,d,P1/N1,…,Pn/Nn] | Extended fuzzy trapezoid (with some points Pi/Ni where all the Ni are between a and b or between c and d). Values b and c are both optional. If they do not exist, then this constant is a fuzzy value without kernel. |
n+-m | Fuzzy value “Approximately n”: triangle n ± m. |
{P1/L1, P2/L2,…, Pn/Ln} | Non-continuous possibility distribution on labels, where P1, P2, …, Pn are the possibility values and L1, L2, …,Ln are the labels. |
{L1, L2,…, Ln} | Non-continuous possibility distribution on labels, where L1, L2, …, Ln are the labels, with possibility degrees 1 for all of them: {1/L1, …, 1/Ln}. |
{P1/N1, P2/N2,…, Pn/Nn} | Non-continuous possibility distribution on numbers, where P1, P2, …, Pn are the possibility values and N1, N2, …, Nn are the numbers. |
{N1, N2,…, Nn} | Non-continuous possibility distribution on numbers, where N1, N2, …, Nn are the numbers, with possibility 1 for all of them: {1/N1, …, 1/Nn}. |
Abstract: This paper studies how fuzzy quantifiers may be defined and implemented in a fuzzy database context. Fuzzy quantifiers are very useful for fuzzy queries, fuzzy constraints and fuzzy data mining applications. Besides, this paper shows different kind of fuzzy quantifiers with and without arguments. Finally, we show how fuzzy dependencies may use these fuzzy quantifiers.
Abstract: The client-server model is being used mostly in the actual DataBase Management Systems (DBMS). However, these DBMS do not allow either to make flexible queries to the database or to store vague information in it. We have developed a FSQL Server for a Fuzzy Relational Database (FRDB). The FSQL language (Fuzzy SQL) is an extension of the SQL language that allows us to write flexible conditions in our queries. This Server has been developed for Oracle, following the model GEFRED, a theoric model for FRDB that includes fuzzy attributes to store vague information in the tables. The FSQL Server allows us to make flexible queries about traditional (crisp) or fuzzy attributes and we can use linguistic labels defined on any attribute.