fuzzy object-oriented databases

6
Fuzzy Object-Oriented Databases and Implementation of t S ata Manipulation Langua ge Motohide Umano' Takafumi Imada2 Itsuo Hatono2 Hiroyuki Tamura2 1 : . 2: Department of Mathematics and Information Sci ences College o f Integrated Arts and Sciences Osaka Prefecture University 1-1, Gakuen-eho, Sakai, Osaka 599, Japan Phone: +81 -72 2-5 2-1 161 ext.27 39, Fax: +81-722-55-2981 Internet: [email protected]  Division of Systems Science Department of Systems and Human Science Graduate School o f Engineering Science Osaka University, Toyonaka, Osaka 560, Japan Abstract Ordinary object-oriented databases have been well studied. We have already proposed a fuzzy object- oriented database that can treat fuzzy-set attribute values with certainly factors and fuzzy inheritance. In this paper, we design and implement an SQL- type data manipulation language and demonstrate its facilities using several examples. 1 . Introduction Recently, object-oriented databases (OODB) have been well studied [1] and applied t o many fields such a s office information and knowledge- based systems, CAD/CAM, hardware and soft- ware design and network management. It is, how- ever, very difficult for OODB to represent and ma- nipulate fuzzy data in the real world. Studies o n fuz zy databases have mainly focused on fuzz y re- lational ones [2], but very recently several fuzzy object-oriente d datab ase systems are proposed [3 ] In [4], we implemented a prototype of a fuzzy [41, [51. OODB (FOODB) and its data manipulation lan- guage based on Encore query algebra [6 ] written in AKCL (Aust in Kyoto Common Lisp) and running on a UNIX operating system. In this paper, we design and implement a new data manipulation language, a FOODB version of SQL (structured query language) and demonstrate its facilities using several exa mples. 2. Fuzzy Qbject-Oriented Databases We have an example of a fuzzy object-oriented database of human shown in Fig. 1, where we have classes human, student, male, female, home and university and instances Suzuki-Ichiro, Tanaka- Nanako an d Yumadu- Taro. Th e attribute values o f Yamada-Taro are height=75, weight={0.5/70, 1/80, 1/90} and age=25, which are not shown in Fig. 1 . We can have a fuzzy set with a certainty factor a s an attr ibu te value and defi ne fuz zy terms (names of fuzzy sets) and fuzzy predicates in an at tri bute for its o wn usage . In Fig. 1, the attribute 0-7803-4863-Xl98 $10.00019 98 IEEE 1344 Authorized licensed use limited to: Jaypee Institute of Technology. Downloaded on September 8, 2009 at 19:10 from IEEE Xplore. Restrictions apply.

Upload: muditsingh5000

Post on 06-Apr-2018

226 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Fuzzy Object-Oriented Databases

8/2/2019 Fuzzy Object-Oriented Databases

http://slidepdf.com/reader/full/fuzzy-object-oriented-databases 1/6

Fuzzy Object-Oriented Databases

and

Implementation of

t S ata Manipulation Language

Motohide Umano' Takafumi Imada2 Itsuo Hatono2 Hiroyuki Tamura2

1:

. 2:

Department of Mathematics and Information Sciences

College of Integrated Arts and Sciences

Osaka Prefecture University

1-1, Gakuen-eho, Sakai, Osaka 599, Japan

Phone: +81-722-52-1161 ext.2739, Fax: +81-722-55-2981

Internet: [email protected] 

Division of Systems Science

Department of Systems and Human ScienceGraduate School of Engineering Science

Osaka University, Toyonaka, Osaka 560, Japan

Abstract

Ordinary object-oriented databases have been well

studied. We hav e already proposed a fu zz y object-

oriented database that can treat fuzz y-se t attribute

values with certainly factors and fuzz y inh eritanc e.

I n this paper, we design and implem ent a n SQL-

type data manipulation language and demonstrate

its facilities using several exam ples.

1. Introduction

Recently, object-oriented databases (OODB)

have been well studied [1]and applied t o many

fields such as office information and knowledge-

based systems, CAD/CAM, hardware and soft-

ware design and network management. It is, how-

ever, very difficult for OODB to represent and ma-

nipulate fuzzy dat a in the real world. Studies onfuzzy databases have mainly focused on fuzzy re-

lational ones [ 2 ] ,but very recently several fuzzy

object-oriented database systems are proposed [3]

In [4], we implemented a prototype of a fuzzy[41, [51.

OODB (FOODB) and its data manipulation lan-

guage based on Encore query algebra [6 ]written in

AKCL (Austin Kyoto Common Lisp) and running

on a UNIX operating system.

In this paper, we design and implement a new

data manipulation language, a FOODB version of

SQL (structured query language) and demonstrateits facilities using several examples.

2. Fuzzy Qbject-Oriented Databases

We have an example of a fuzzy object-oriented

database of h u ma n shown in Fig. 1,where we have

classes hum an, s tuden t , male , female , home and

univers i ty and instances Suzuki-Ichiro, Tanaka-

Nanako and Yumadu-Taro. The attribute values

of Yamada-Taro are height=75, weight={0.5/70,

1/80, 1/90} and age=25, which are not shown inFig. 1.

We can have a fuzzy set with a certainty

factor as an attribute value and define fuzzy terms

(names of fuzzy sets) and fuzzy predicates in an

attribute for its own usage. In Fig. 1, the attribute

0-7803-4863-Xl98 $10.00019 98 IEEE 1344

Authorized licensed use limited to: Jaypee Institute of Technology. Downloaded on September 8, 2009 at 19:10 from IEEE Xplore. Restrictions apply.

Page 2: Fuzzy Object-Oriented Databases

8/2/2019 Fuzzy Object-Oriented Databases

http://slidepdf.com/reader/full/fuzzy-object-oriented-databases 2/6

height

weight

age(term

old:{0.3/40,0.7/50,/60,/70}

young:{1/0, /10,.5/20,0.3/30)

old: (s x40 0)young: (z x 20 30) )

(Prd

\

r

height

university

lecture

grade

.- L

I O ID %t10 I

university: *---....... (c f 0.4)

home: a ......................... ....

lecture:.....f fuzzy-theory (cf: 0.5)

'***qrade:{ {ml,2) (cf 0.8)-.- ..

(termtall:(0.4/175,0.8/180,

1/185, /190}

short:(1/155, /160,0.5/165})

(pred tall: (s x 170 185)short: (z x 160 170)

weight(term

heavy: 0.5/70, 1/75, /80}

light:{1/50, /55,0.5/60}

@redheavy: (s x 65 75)light: (z x5565)

height: 170weight: light

age: young

university: am........homg.. .............a

............................

lecture: {0.8/fuzzy-theory, ...}I

(termtall:(0.5/160,0.8/165,

1/170,1/175}

short:(1/145, /150,0.5/155}

(pred tall: (s x 160 170)short: (z x 150 160)

weight(term

heavy: {0.5/60, /65, /70}

light: 1/40,/45,0.5/50}

(Predheavy: (s x 5565)light: (z x45 5) )

4 grade: m2 I

height:165

weight: light

age: (0.5124, /25,0.5/26}

. tel-no.

t1 suzuki

7tanaka

7Osaka-u 1OID: %t2 OID: %t4 om: %to

tel-no: 0727-99-9999 tel-no: 0722-44-4444 tel-no: 06-844-15

address: kawanishi address: sakai address: toyonaka

Fig. 1 . An example of fuzzy data

1345

A h i d li d li i d J I i f T h l D l d d S b 8 2009 19 10 f IEEEX l R i i l

Page 3: Fuzzy Object-Oriented Databases

8/2/2019 Fuzzy Object-Oriented Databases

http://slidepdf.com/reader/full/fuzzy-object-oriented-databases 3/6

weight of Suzuki-Ichiro and Tanaka-Hanako have

the same fuzzy set name (term) ight but its values

are different since the former is defined as the

fuzzy set {1/50, 1/55, 0.5/60} in the class maze

and the latter {1/40, 1/45, 0.5/50} in the class

female. Thus, a term can be defined by different

fuzzy sets in different attributes or different ob-

jects [2]. It should be noted that a term young has

the same meaning in Suzuki-lchiro and Tanaka-

Hanako because it is defined in the common super

class human. A certainty factor can be a fuzzy set

in the unit interval [0, 11 although we have no such

examples in this paper.

We can describe, fo r example, the class human

and the instance Suzuki-Ichiro in the followings:

(%def class 'human

:super n i l:attribute

' ((height (%value nil))

(weight (%value nil)

(age

(%term(old

(0.3/40, 0 . 7 / 5 0 , 1/60, 1/70>)

C l / O , 1/10, 0.5/20, 0.3/30)))(Young

(%pred(old (x) ( s x 40 60))

(young (x) (z x 20 30)))

) > )

(yaakeinstance ' uzuki-Ichiro

:super '((student 1) (male 1 ) )

:attribute

((height (%value 170 1 ) )

(weight (%value light 1))

(age (%value young))(university (%value Osaka-U I))

(home (%value Suzuki I))

(lecture

(grade ('/.valuem2 1))

> > 1

(%value {0.8/fuzzy-theory, ... >

Classes and instances inherit attributes of their

super classes. In our system, we can define degrees

of inheritance which can be numbers or fuzzy sets

in [0, 11. Note that an instance, say, Suzuki-Ic'chiro,

belongs to more than one class, s t uden t and maze,

which means that this system supports a multiple

inheritance [11.

3. SQL-type Data Manipulation Lan

€ w e e

The SQL (structured Query Language) [7] i

now the standard data manipulation language inordinary databases. It is very important to in

vestigate the possibility of applicability of SQL to

fuzzy ob ect-oriented databases.

We design and implement an SQL-type dat

manipulation language for the FOODB. We wil

demonstrate the seEect statement for retrieving

fuzzy da ta using several simple examples. Thes

examples only show how queries are written i

the language and how they retrieve from the fuzzy

object-oriented database. More discussions will b

described in the subsequent papers.

Example 1. (non-fuzzy etrieval)

Retrieve height of a student whose name is Suxuki

Ichiro.

>(select height

from student

where (%= student. name

'Suzuki-Ichiro))

(170)

where > is a prompt, followed by the user inpu

and the result.

The select is followed by attribute names t

be retrieved, the from by class names for retrievin

instances and the where by the condition to b

satisfied by the instances. Since %name is a specia

attribute for the name of instance, student. nam

means s t uden t ' s name.

Example 2. (retrieval with funetion %=)

Retrieve names of students whose weights arc 70

>(select %me from student

where (%= student.weight 7 0 ) )

CO. 167/yamada-taro)

The %=is a built-in function defined as

where (f z1 z2 . - 2 is a Lisp-like notation fo

f(z1,2, . . z,), the symbols n and U mean th

1346

Page 4: Fuzzy Object-Oriented Databases

8/2/2019 Fuzzy Object-Oriented Databases

http://slidepdf.com/reader/full/fuzzy-object-oriented-databases 4/6

intersection and the union of fuzzy sets, respective-

ly, and [AI stands for the cardinality of the fuzzy

While Tanaka-Hanako belongs to the class

female and a fuzzy predicate tall in the class

set A , i.e., the sum of the membership values of

A . Note that (%= A B ) = 1 for A = B and = 0

for A nB = 8.For the values of student. weight, Yamada-Taro

is {0.5/70, /80, /90}, Tanaka-Hanako is light in

the class f em a l e and Suzuki-lchiro is light in the

class male. We have their matching degrees as

follows:

Yamada : 1{0.5/70}1 f ~{1/70,1/80,1/90}~

Tanaka : 1{0/70}(i== 0.5i = 0.167

I{1/40,1/45,0.5/50,1/70}~

female is applied to her as follows:

Suzuki : ( tal l 165)

= (S165 160 170)= 0.5

Although Tanaka-Hanako is shorter than

Suzuki-lchiro,she is included in the result but not

Suzuki-Ichiro. Note that when the result is a fuzzy

set, the order of membership value/elements pairs

is alphabetical of their elements.

We have a good notation (so called, syntax

sugar) like (height = young) for (young height)

only for fuzzy predicates.

== 0 -+3.5 = 0Example 4. (retrieval with fuzzy predicate

No.2)Retrieve names of students whose ages are young.

Suzuki : I{0/70}i

~{1/50,1/55,0.5/60,1/70}~

== 0 + 3.5 = 0>(select h a m e

from student

where (young age))Note that symbols are output in lower case

letters even if we input them in capitalized string.

Example 3. (retrieval with fuzzy predicate

No.1)

Retrieve names of students whose heights are tall.

((0.3/0,l/l)/suzuki-ichiro,

(0.5/0.4,1/0.5,0.5/0.6)/tanaka-hanako,

0.5/yamada-taro)

In this example, a fuzzy predicate young is

defined in the class human whose truth value is

(z x 20 30), where (z z a b) is a linear-shaped Z

function defined as 1 for x < a, (z - a ) / ( b- a)(select %namefrom student

where (tall height))

IO .5/tanaka-hanako, 0.333/yamada-taro}

The attribute values of the instances Yamada-

Taro and Sumki-lchiro are 175 and 170, espec-

tively. Since they belong to the class male, the

fuzzy predicate tall in male is applied to their

heights. The truth values of the male's predicate

tall is (s z 170 185),where a function (z x a b ) is

for a < z < b and 0 for b 5 2. Since the age of

Yumada-Taro is 25, his degree of young is 0.5.In

the other hand, since the age of Tanaka-Hanako

is {0.5/24,1/25, 0.5/26},we have the degree of

young for her computed using the extension prin-

ciple for 1-variate functions proposed by Zadeh [8]

as follows:

(young {0.5/24,1/25,0.5/26})

a linear-shaped S function defined as 0 for z < a ,

1- (z - U ) / @ - U ) for a 5 z < b and 1 for b 5 z.Thus, we have their degrees of tall as follows:

= {0.5/(young 24), /(young 25),

= {0.5/0.6,1/0.5,0.4/0.5}0.5/(young 26))

The age for Suxuki-lchiro is defined in the human

as a term y o u n g = { l / O , 1/10, 0 .5 /20 , 0.3/30} not

as a predicate and the degree of young is computed

using a predicate young=(z z 20 30) in the human.

Suxuki : (tall 175)

Yamada : (tall 170)

= (S 175 170 185)= 0.333

'= (S 170 170 185)= 0

1347

Page 5: Fuzzy Object-Oriented Databases

8/2/2019 Fuzzy Object-Oriented Databases

http://slidepdf.com/reader/full/fuzzy-object-oriented-databases 5/6

Thus we have the followings:

( young Young)

= { l / ( y ou ng o> , l/ ( Yo. t lng l o ) ,

= ( y o u n g { l / O , 1/10 ,0 .5 /20 ,0 .3 /30})

0 .5 / ( young 20) ,0 . 3 /( youAg 30 ) )

= { 1 / 1 , 1 / 1 , 0 . 5 / 1 , 0 . 3 / 0 }= { l / l , . 3 / 0}

Example 5 . (making a new class)

Retrieve heavy persons and make a class of heavy

persons.

>(xdef rclass’heavy-person

(select

from human

where (heavy weight)))

heavy-person

>(select %name

({0.5/0.5,1/0.9)/yamada-taro)

from heavy-person)

We retrieve persons whose weights are heavy

with the select and define a class heavy-person,

where the degree of heavy for weight becomes a

degree of inheritance.

Now we have a class heawy-person and we can

use it in queries. For example, a query “retrieve

tall person in heavy-person” is as follows:

>(select %namefrom heavy-person

where ( t a l l height))

CO. 333/yamada-taro)

4. Execution Process for Select State-

ment

As illustrated in the examples in the previous

section, we must consider three degrees in the ex-

ecution process for a select statement, that is, ( 1 )

degrees with which instances belong to the speci-

fied class, (2) certainty factors in the specified at-

tributes in the instances in the specified classes

and ( 3 ) degrees with which the instances satisfy

the condition.

More specifically, consider that (select - rom

C1 C2 . . C, where ( p e d a1 a2 . . . a,)). Its ex-

ecution process is shown in Fig. 2, where Oi is

an instance of the class Ci through inheritance

degrees iij and wk is a value of the attribute ak

with the certainty factor cfk.

First, the degree I ; with which the instance

Oi belongs to the class Ci through the inheritance

degrees i i j is computed by the function f~ bound

in the global variable func- inher i t$. Second, thetotal degree Itotd of the inheritances is comput-

ed from I1 , 12 , ..., I , by a function f 2 bound in

*func-inherit-for-select*.Third, the to tal certain-

ty factor cftotal is computed from certainty factors

cfi , cf2, - - -, fm for the attributes a l , a2, . ..,a m in

the predicate pred by a function f3 bound in *fine-

cf-for-select*. Forth, the degree T~with which at-

tributes values V I , 212, . ..,v, satisfy the predicate

pred. Finally, the degree ptotalf the result is com-

puted from Ittotal,ftotal and T~ by a function f4

bound in *func-grade-inherit-cf*. These defaultfunctions are min.

5. Conclusion

We have designed and implemented an SQL-

type data manipulation language for fuzzy object-

oriented databases. The future problems include

retrieval of classes and fuzzy integrity.

References

W. Kim and F.H. Lochovsky (1989) : Object-

Oriented Concep ts, Databases, and Applica-

t ions , ACM Press (New York, New York, US-

A).

M. Umano and S. Miyamoto (1993) : “Recent

Development of Fuzzy Database Systems and

Applications,” Fif th Internat ional Fuzzy Sys-

t ems Associa t ion World Congress , pp.537-

540.

R. George, B.P. Buckles and P.E. Petry ( 1993): “Modelling Class Hierarchies in the Fuzzy

Object-Oriented Data Model,” Fuzzy Sets and

Sys t em s , Vo1.60, pp.259-272.

M. Umano, T. Imada, I. Hatono and H.

Tamura (1995) : “Implementation of a

1348

A h i d li d li i d J I i f T h l D l d d S b 8 2009 19 10 f IEEEX l R i i l

Page 6: Fuzzy Object-Oriented Databases

8/2/2019 Fuzzy Object-Oriented Databases

http://slidepdf.com/reader/full/fuzzy-object-oriented-databases 6/6

Fig. 2. Computing Process for Query

Fuzzy Object-Oriented Database,” Sixth In-

ternational Fuzzy Systems Association World

Congress, pp.40 1-404.

[7] C.J. Date and H. Darwen (1993) : A Guide

to the SQL Standard (3rd Edi t ion) , Addison-

Wesley (Reading, Massachusetts, USA).

[5] R. de Caluwe (1997) (ed.) : Fuzzy and Un-

certain Object- Oriented Models-Concepts andModels, World Scientific (Singapore).

[8] L.A. Zadeh (1975) : “The Concept of a Lin-

guistic Variable and Its Application to Ap-

proximate Reasoning,” Information Sciences,

V0l.8, pp.199-248; Vo1.8, pp.301-357; Vo1.9,

[6]G.M. Show and S.B. Zdonik (1990) : “A pp.43-80.

Query Algebra for Object-Oriented Data-

bases,” IE EE International Conference o n Da-

ta Engineering, pp.154-162.

1349

A th i d li d li it d t J I tit t f T h l D l d d S t b 8 2009 t 19 10 f IEEE X l R t i ti l