Weekly report for 28 May 2010 on Project "Database Module + FuzzySQL"
This week I have spent implementing C++/Qt - class FSQL, which will enable executing fuzzy queries against PostgreSQL databases.
I was hesitating a lot about whether Fuzzy SQL - translator should be database-independent or bound to specific DBMS. The bottleneck here is implementing fuzzy math in stored procedures/ functions (using PostgreSQL terminology). It is likely that this functions will work faster if implemented in procedural language, like PL/pgSQL, PL/SQL or PL/Tcl. Bu this is not DBMS-independent way.
So, I decided to try doing it through SQL-functions. Later after considering performance, it should be easily redone for specific DBMS's, e.g. PostgreSQL, because it perfectly copes with complicated queries and functions can be written either in C or in PL/pgSQL or PL/Tcl.
From the bird's-eye view handling fuzzy queries required deploying some metatables in database, against which we'd like to run fuzzy queries. Those metatables are referred to as Fuzzy Meta Base (FMB). They store information about fields, that admit fuzzy treatment, fuzzy quantifiers, linguistic labels, etc. In bool "Galindo J., Urrutia A., Piattini M., "Fuzzy Databases: Modeling, Design and Implementation" authots propose FMB of 12 tables. I will follow that model.