Documente Academic
Documente Profesional
Documente Cultură
manipulation of FRDB
Habib OUNALLI
FST, TUNISIA
habib.ounelli@fst.rnu.tn
ABSTRACT
The Fuzzy Relational Databases (FRDB) has been extensively studied in a theoretical level.
Unfortunately, the repercussions of these works on the practical level are negligible.
Medina et al. have developed a server named FSQL, supporting flexible queries on FRDB.
The FSQL Server is based on a fuzzy relational model named GEFRED. This server has been
programmed in PL/SQL language under Oracle. Flexible queries in FSQL are expressed with
an extension of the standard SQL, named FSQL (Fuzzy SQL). The FSQL server uses a Fuzzy
Meta-knowledge Base (FMB) to model the different types of fuzzy attributes. Since Oracle
doesn't recognize FSQL, consequently we must transform an FSQL script in a SQL script
equivalent, which includes the necessary updates of the FMB. This hard task is supposed
already made in the implementation of FSQL server by Medina et al.
We propose in this paper an extension of FSQL server in order to remedy this serious limit
especially in the case of voluminous DB. Our extension consists in transforming a FSQL
script automatically in an SQL equivalent, including the necessary updates of the FMB. This
extension has two enhancements to FSQL, while preserving all its possibilities: (1) a better
extensibility notably in case of addition of new fuzzy types and (2) the possibility of
definition and the manipulation of FRDB directly with the FSQL language. The enhanced
server is operational under Oracle.
Key Words: FSQL, Fuzzy relational database, Flexible queries, GEFRED, FIRST.
As result of these two treatments, we obtain 2) insert the tuples in the FMB containing
two files: a file containing the DDL part of the the fuzzy attributes defined on this
DB and a second containing the modification table,
to do in the FMB. We can also regroup the 3) model the different commands
two treatments in a same file since they will be CREATE LABEL, CREATE
executed in the DBMS. This process of NEARNESS in the FMB.
working is illustrated in the figure 10.
1
We are interested in this paper to the 3 fuzzy attributes
FTYPE1, FTYPE2 and FTYPE3 Fig. 10: Functioning of FSQL_TO_SQL
We associate to each type of attribute a specific Type of attribute Treatment in the FMB
treatment according to the rules described in
FTYPE1, FTYPE2 1) store in the FCL table
the table 4 and 5. FTYPE3, FTYPE4 the information on the
attribute (name, type,
Attribute Treatment in the database length and a commentary),
type
2) store the values in
FTYPE1 1) delete FTYPE1 from the command FTYPE1, FTYPE2
brackets that follows
syntax FTYPE1 (n,m) in the
1) delete FTYPE2 from the command FAM table.
syntax,
2) store in the FCC table
2) concatenate the attribute with the letter FTYPE3, FTYPE4 the compatible attributes
'T' follow-up of the restriction of its with him
values (they must be in the interval Classic Nothing to do
[0,10]),
3) concatenate the attribute respectively Tab. 6: CREATE TABLE in FMB
with 1, 2, 3 and 4 (Attribute1,…,
FTYPE2 Attribute4). The attribute changes into
2n+1 attributes, Translation of the command CREATE
4) add in the same line its type of basis
LABEL
(classic type defined after FTYPE. By 1) insert in the FOL table the identifier of
default is NUMBER), the linguistic label, its name and its type.
5) translate the word "DEFAULT" 2) insert in the FLD table the parameters of
according to the table 2, linguistics label (a,b,c,d), etc.
6) translate the restriction according to the
table 2. Translation of the command CREATE
1) delete FTYPE3 (resp. FTYPE4) from NEARNESS
the syntax of the command, 1) insert in the FOL table the identifier of
2) concatenate the attribute with the letter the linguistic label, its name and its type.
'T' follow-up of the restriction of its 2) insert in the FND table the list it of the
values (they must be in the interval linguistic labels with their similarity degrees.
[0,4]),
3) concatenate the attribute n time 6. Description of the software
respectively with Pi then with i, FSQL_TO_SQL
knowing that n is provided between
FTYPE3 FSQl_TO_SQL offers a convivial interface that, on
parenthesis after the word "FTYPE3 or
FTYPE4 FTYPE4" and 1≤i≤n,
the one hand, presents an editor of FSQL script
description, and on the other hand, gives
4) add its basic type (by default it is automatically its equivalent in SQL with the update
NUMBER(3,2)) for AttributePi and of the corresponding FMB. It is developed in C++
NUMBER(3) for Attributei (the
language.
attribute changes into 2n+1 attributes),
To use FSQL_TO_SQL, the user must, first of all,
5) translate the word "DEFAULT" load the script of its FRDB modeled in FSQL either
according to the table 3, by writing it under the editor or by specifying the
6) translate the restriction according to path of the file source containing its script (.fsql).
the table 3.
Classic Nothing to do While clicking on the button "translate" which is in
bar of menu under Action (figure 11),
Tab. 5: CREATE TABLE in DB FSQL_TO_SQL generates its equivalent in SQL
(figure 12).
Conclusion
The FRDB have been studied extensively on
the theoretical level. However, the repercussions
of these works on the practical level remain
negligible. The few achieved works limited
Translate themselves to the flexible querying of classic
FSQL query DB (crisp DB). Among these works, the one of
Medina and al is very interesting. Medina et al.
developed an FRDB server around Oracle named
FSQL Server. This implementation treat only
the flexible querying while supposing that the
DB diagram was already defined.
Fig. 11: Translation FSQL query The diagram definition is made with an
extension of SQL (FSQL) that introduces new
data types for the fuzzy attributes. Since Oracle
doesn't support the FSQL language, a
preliminary stage is necessary to transform the
FSQL commands to their SQL equivalent. We
showed that this transformation (mapping) is
from afar an easy task.
We proposed an extension of FSQL server
while achieving this transformation
automatically. This extension, that preserves
the FSQL acquirements, presents two
following advantages: (1) a bigger extensibility
notably in case of addition of new fuzzy types
and (2) the definition and the manipulation of
fuzzy DB directly with the FSQL language.
References:
[1] P. Bosc, L. Liétard, O. Pivert, "Bases de
données et Flexibilité : Les requêtes Graduelles"
Techniques et Sciences informatiques, 17(3), 1998,
pp. 355-378.
[2] P. Bosc and O. Pivert, "SQLf: A Relational
Database Language for Fuzzy Querying", IEEE
Transactions on Fuzzy Systems, Vol 3, No. 1, Feb
1995.
[3] B. P. Buckles, F. E. Petry, "A Fuzzy
Representation of Data for Relational Databases".
Fuzzy Sets and Systems, 7, 1982, pp. 213-226.
Fig. 13: detection of errors
[4] J. Galindo, M. Medina, M. A Vila, J. C.
Cubero, "Fuzzy Comparators for Flexible Queries
to Databases". In: Proc. of IBERAMIA'98. Lisbona
(Portugal), 1998
[5] J. Galindo, J. M. Medina, O. Pons, and J. C.
Cubero, “A server for fuzzy SQL queries,” in
Flexible Query Answering Systems, T. Andreasen,
H. Christiansen, and H. L. Larsen, Eds. New York:
Springer-Verlag, 1998, pp. 164–174. Lecture Notes
in Artificial Intelligence (LNAI)1495.
[6] J. Galindo, the FSQL server + FQ ":
http://www.lcc.uma.es/personal/ppgg/FSQL
[7] J. Galindo, “Tratamiento de la imprecisión en
bases de datos relacionales: Extensión del modelo y
adaptación de los SGBD actuales,” Ph.D.
dissertation, Univ. Granada, Granada, Spain, Mar.
1999.
[8] J. Galindo, A. Urrutia, M. Piattini,
"Representation of Fuzzy Knowledge in Relational
Databases". 15th International Workshop on
Database and Expert Systems Applications (DEXA
2005), published by IEEE Computer Society, 2005,
pp. 917-921.
[9] J. Galindo, A. Urrutia, M. Piattini, Fuzzy
Databases: Modeling, Design and Implementation.
Eds. Idea Group Publishing Hershey, USA, 2005.
[10] J. Galindo, "New Characteristics in FSQL, a
Fuzzy SQL for Fuzzy Databases". WSEAS
Transactions on Information Science and
Applications 2, Vol. 2, 2005, pp. 161-169.
[11] J. M. Medina, O. Pons, M. A. Vila,
“GEFRED. A Generalized Model of Fuzzy
Relational Data Bases”. Information Sciences,
76(1-2), 1994, pp. 87-109.
[12] J. M. Medina, O. Pons, A. Vila, “FIRST. A
Fuzzy Interface for Relational SysTems”. VI
International Fuzzy Systems Association World
Congress (IFSA 1995). Sao Paulo (Brasil), 1995.
[13] H. Prade, C. Testemale, "Fuzzy Relational
Databases: Representational issues and Reduction
Using Similarity Measures". J. Am. Soc.
Information Sciences 38(2), 1987, pp. 118-126.
[14] M. Umano, S. Fukami, M. Mizumoto, K.
Tanaka "Retrieval Processing from Fuzzy
Databases". Technical Reports of IECE of Japan,
Vol. 80, No 204, (on Automata and Languages),
1980, pp. 45-54, AL80-50.
[15] Yoshikane Takahashi, "Fuzzy Database Query
Languages and Their Relational Completeness
Theorem" IEEE Transaction On Knowledge and
Data Engineering, vol 5, N° 1, February 1993
[16] M. Zemankova-Leech, A. Kandel,
"Implementing Imprecision in Information
Systems". Information Sciences, 37, 1985, pp. 107-
141.