Weekly report for 30 July 2010 on Project "Database Module + FuzzySQL"
This week I have:
- implemented the LoadFMB ()function, which creates a local copy of the Fuzzy Meta Base from database. This local copy is then used to translate fuzzy queries and makes it much faster, that every time querying database for information on fuzzy objects. If the query is incorrect according to information of Fuzzy Meta Base (for example, a linguistic label does not exists or columns, than are compared, are incompatible, or fuzzy attribute, used with fuzzy comparators, does not exist, etc.), the user will receive a warning without querying a database.
- implemented creators, getters and deleters functions in FMB class for creation / deletion / accessing fuzzy objects.
- implemented stored procedures for comparing attributes of types 3 and 4. For this types only operators FEQ (F=, fuzzy equal) and FDIFF (fuzzy difference) can be used. The formula for FEQ for type 3 is max(i,j) {Mu(labelA(i), labelB(j)) * AP(i) * BP(j)}, where A={FA(i)/labelA(i)}, B={FB(i)/labelB(i)}. Similarity relation between labels is stored into FMB table fuzzy_nearness_def. For fuzzy attributes and constants of type 4 the formula is the same, but there is no similarity relation for objects of this type, so Mu(labelA(i), labelB(j)) = 1, if labelA(i) = labelB(i), and 0, otherwise.
- implemented a parser for fuzzy attributes of type 2, which transforms a string representation of fuzzy constant (or label) into a fuzzy object, whose attributes are later used to construct a call of stored procedure for fuzzy comparisons.
Next week
Write a translator of fuzzy queries with following features:
- fuzzy comparators: replaced with proper stored procedure calls
- query example: "SELECT * FROM Cities WHERE Population FGT 20000+-3000", FGT - fuzzy operator "Fuzzy greater than", 20000+-3000 - fuzzy constant, "blured" number 20000; This query selects all cities and a special column for compatibility degree of a given condition;
- fulfillment degree (using keyword THOLD (optional)) - a WHERE-condition must be added to a query
- query example: "SELECT * FROM Cities WHERE Population FGT 20000+-3000 THOLD 0.6" - selects only those cities, for which a given condition is fulfilled with at least 0.6;
- CDEG - keyword - means a compatibility degree can be applied to a complex expression with AND, OR and NOT operators
query example: "SELECT * FROM Cities WHERE CDEG(Population FGT 20000+-3000 AND Budget FEQ 5000000) >= 0.8)" - select a cities in which two given conditions are true with a compatibility degree at least 0.8;