A structure to support queries in object-oriented database using fuzzy XML tags

Article history: Received June 4, 2014 Accepted 12 October 2014 Available online October 2


Introduction
Classical relational database model does not provide the users' necessities who wish to work with uncertain data; therefore, the fuzzy object-oriented database has been defined.Fuzzy object-oriented database models in the logical level handles any uncertainty information by defining some basic concepts of database such as objects, classes, object-classes relations, super classes and inheritance under fuzzy environment and we expect the queries that return better results.By defining the fuzzy attributes in this type of database, a user may not have to enter deterministic values but can fill attribute values with linguistic variables and assign a membership degree.Results of this type of database can belong to the solution set with a membership degree too.Whereas classical database does not permit the user to do such thing and only support the answers that meet to all query conditions and not a part of their conditions.This lack of flexibility in entering data and returning response always hurt the users, therefore we present an approach, which can support fuzzy queries in fuzzy object-oriented database.In the second part of the paper, the background research is described and in the third part, related works are reviewed.The proposed method of this paper to present fuzzy queries with sql syntax and fuzzy XML tags is described in fourth section.The fifth part presents a case study and the sixth part is devoted to conclusions.

Background
Background includes Fuzzy object-oriented database, Object query language and XML.

Fuzzy object-oriented database
Classical relational database model and its extension of imprecision and uncertainty do not satisfy the necessity of modeling complex objects with imprecision and uncertainty.So many researches have been concentrated on the development of some database models to deal with complex objects and uncertain data together.In order to model uncertain data and complex-valued attributes as well as complex relationships among objects, current efforts have concentrated on conceptual data models and object-oriented databases (OODB) with imprecise and uncertain information.Incorporation of the imprecise and uncertain information in object-oriented databases has increasingly received significant attentions, where fuzziness is witnessed at the levels of object instances and class hierarchies.The combined fuzzy and uncertain object-oriented databases offer the power of objectorientation and the availability of a richer semantic expressiveness.The uncertainty in classification and in the inheritance hierarchies in class/subclass relationships, as a consequence of the allowed imprecision in data is modeled by using fuzzy set theory.

Extensible Markup Language(XML)
The extensible Markup Language as a data formatting recommendation was proposed by the W3C as a simplified form of the Standard Generalized Markup Language (SGML) and it is becoming the de facto standard for data description and exchange between different systems and databases over the Internet.As a new markup language, XML supports user-defined tags, helps the separation of document content from its presentation, and it makes it possible to automate web information processing.This creates a new set of data management needs involving XML, such as the need to store and query XML documents.The XML can be used in the following:  Exchange the data between disparate applications, businesses and Databases  Enable a model to display the same data on various devices with different purposes and readers. A suitable format for storing data

Object Query Language (OQL)
Object Query Language (OQL) is a procedural Language, which helps establishment of a relationship with an object-oriented database.OQL commands are somewhat similar to the relational database SQL commands.This language is not a purely linguistic computing language and we can do largely programming operations by it.This language is more flexible than SQL and user-defined functions and new data types can be defined by users.

Related works
Recently, there have been several works on modeling fuzzy data and working on object-oriented database.Ma et al. (2004) proposed an extended object-oriented database model to handle imperfect as well as complex objects in the real world based on possibility distribution and the semantic measure of fuzzy data.In their model, some major notions in object-oriented databases such as objects, classes, objects-classes relationships, subclass/superclass, and multiple inheritances were extended under fuzzy information environment.Chakhar and Telmoudi (2004) proposed a new database model named "Fuzzy Semantic Model (FSM)", which helps us capture effectively the fuzziness and semantics of real-world and provides tools for its formalization and conceptualization within a manner adapted to human perception and reasoning.One of the novelties of FSM is that it authorizes an entity to be a member of several classes at the same time and according to various degrees of memberships, which reflect the extent to which the entity verifies the attribute-based and/or semantic proprieties of these classes.Ma et al. (2001) introduced a fuzzy extended entityrelationship model to cope with imperfect as well as complex objects in the real-world at a conceptual level.They provided the formal technique to map a fuzzy extended entity-relationship model to a fuzzy object-oriented database schema.Rodrigues et al. (2009) presented a fuzzy database architecture, where fuzzy meta-data is introduced and it facilitates data management tasks.Liu and Song (2001) presented an expression of the semantic proximity.They presented a model based on the concept of semantic proximity, a method of evaluating the degree of fuzzy and it has been proved that the method was efficient and acceptable.Gupta et al. (2011) presented a mechanism to use fuzzy information in a traditional database.The proposal is to include the capability of representing and handling fuzzy information in a traditional database.The proposed model was capable of adopting a particular criterion for fuzzy information representation, i.e., to determine the most suitable representation for imprecise data and operators among those possible in GEFRED Model.Chen (2013) combined fuzzy SQL with object-oriented databases and established the structure of fuzzy object-oriented SQL for fuzzy query.The significance of this paper was to design a problem diagnose case to let users and engineers query product problems more conveniently.Kumar et al. (2013) investigated some algebraic operations based on a kind of fuzzy object-oriented database model.Kumari (2013) illustrate uncertainty using Fuzzy Object Oriented Database and Fuzzy Relational Data Base.Object oriented database draw their strength from graphical user interfaces, advanced data management capabilities and powerful modeling techniques.Therefore, in order to deal with inexactness fuzzy techniques it has been extensively integrated with more advanced object oriented database system which is capable to represent and manipulate the complex objects as well as complicated and uncertain relationship exiting among them.

Express object-oriented database queries by using fuzzy labels in XML
In proposed idea, we map fuzzy queries to fuzzy-XML and present our proposed grammar for some commands of DDL, DML and OLAP operators in SQL.We study database queries in two forms of simple and complex.In the form of complex, we use conjunctive queries by using the concept of the belonging degree of weight.Furthermore, we express these queries using XML tags with fuzzy.By combining Fuzzy techniques and XML tags, we can present labels in XML to support queries in object-oriented database.

Syntax of creating class
The syntax of creating class that has fuzzy attributes is given Fig. 1, fuzzy attributes get value by linguistic variables or absolute values.

Syntax of insert
Here, the user is dealing with attributes that can accept fuzzy values so instead of determining exact value of each attribute we can use linguistic variables.If the user chooses to enter linguistic variables, membership degree as specified by the user is given by Fig. 2 as follows,

Fig. 2. Insert syntax with XML tags
where μ is a decimal number between zero and one, which indicates the membership degree of attribute.If the user does not use linguistic variables and enter the exact amount of the attribute, the membership degree of fuzzy attribute is achieved by membership function, which is designed by the designer of the database.

Syntax of update
If we want to update the value of a fuzzy attribute and its membership degree, the update command is used as follows:

Syntax of select
In queries expressed with linguistic variables, we use fuzzy attributes in query condition.If we want to have answers limited to a threshold, we should enter in query structure.Fig. 4 shows the syntax with fuzzy XML tags.

Syntax of conjunctive query
In some queries, the values of two or more fuzzy attributes in query condition are studied, so it is necessary to assign weight to the fuzzy attributes, by calculating threshold final and final membership degree of any object and compare the results of them, it is specified which objects will be answers.Final threshold is achieved by and weight which is assigned in query, according to Eq. ( 1) The final membership degree is achieved, according to Eq. ( 2), 1 2 1 2 ... ( . ) ... (2) Our outputs will have final membership degree which is equal or greater than threshold-final, according to Eq (3).
Syntax of conjunctive query with fuzzy XML tag is shown below:

Case study
The case study of this paper is a sample of fuzzy object-oriented database for working system shown in Fig. 7, it includes classes of employee, phone, department and task.Employee class has a fuzzy association relation with phone class in the first level of fuzzy.Employee instances have a fuzzy association relation with department instances in the second level of fuzziness and also Employee class have many to many relation with Task class.Technical and administrative classes are inherited from task class.The instances of these two classes belong to their classes with membership degree, because a task is not related to technical or administrative, completely, µ is defined for them and shown in dash.

Fig.7.
A sample fuzzy object-oriented database In class Employee, we have two fuzzy attributes, age and salary, therefore Employee class is a fuzzy class in the third level of fuzziness.the range of values that are assigned to each linguistic term is shown in Fig. 8 and Fig. 9.By membership functions, for each object we can specify its membership degree to linguistic variables.Now we study several queries:  The name of Employees who are young: Only obj2 with µ young =0.2 and obj5 with µ young =0.8 meet the condition of this query because their µ young have the value except zero.At first obj2 will be showed then obj5, because µ young value of obj2 is upper than obj5.
 The name of Employees who are middle-aged(w 1 =0.6) and have high salary(w 2 =0.8)

Conclusions
This paper introduced a method for improvement of fuzzy queries in object-oriented database.Fuzzy object-oriented database queries were described by using fuzzy XML tags.For this purpose, we used fuzzy XML tags and included the concept of membership degree in their structure and complex queries in object-oriented database were modified with the concept of belong degree of weight.<select> <aggregation function="count"/> <attribute name="age" /> </select> <from> <class name="Employee"/> </from> <GroupBy><RollUp> <attribute name="age" /> </RollUp></GroupBy>

Fig. 8 .
Fig. 8. Different values of fuzzy age attribute Fig. 9. Different values of fuzzy salary attributeFor a sample, a few instances of Employee class are shown in Table1and we applied some queries that were pointed.

Fig. 12 .
Fig. 12. Execute third query Table 1 and we applied some queries that were pointed.

Table 3
Results of third query Age