TELKOM
NIKA Indonesia
n
Journal of
Electrical En
gineering
Vol. 12, No. 10, Octobe
r 20
14, pp. 7438
~ 744
4
DOI: 10.115
9
1
/telkomni
ka.
v
12i8.546
9
7438
Re
cei
v
ed
De
cem
ber 2
4
, 2013; Re
vi
sed
Jul
y
19, 201
4
;
Accepte
d
Augu
st 10, 201
4
Resear
ch and Realization of Wireless Senso
r
Networks
Database
Ping Liu
Comp
uter and
Information En
gin
eeri
ng Instit
ute, Nan
y
a
ng I
n
stit
ute of T
e
chno
log
y
,
Hen
an Na
n
y
a
n
g, 4730
04, Ch
i
n
a
E-mail: ed
uli
u
p
i
ng@
16
3.com
A
b
st
r
a
ct
As the cor
e
a
p
p
licati
on
of w
i
reless s
ens
or n
e
tw
or
k techno
l
ogy, Data
man
age
ment a
nd
p
r
ocessi
ng
have
bec
o
m
e
the r
e
searc
h
h
o
tspot i
n
th
e n
e
w
datab
ase.
T
h
is articl
e stu
d
ie
d
ma
inly
d
a
t
a man
age
men
t
i
n
w
i
reless se
nso
r
netw
o
rks, in
conn
ectio
n
w
i
th the c
har
ac
teristics of the data in
w
i
reless
sensor
netw
o
r
ks,
discuss
ed w
i
r
e
less s
ensor
netw
o
rk data
query, i
n
tegr
at
ing tec
hno
lo
gy
in-d
epth, pro
pose
d
a
mo
bi
l
e
datab
ase struc
t
ure bas
ed o
n
w
i
reless sens
o
r
netw
o
rk
and
carried
out ove
r
all d
e
sig
n
an
d
imp
l
e
m
entati
o
n
for the data managem
ent system
.
Ke
y
w
ords
:
dat
abas
e, netw
o
rk, w
i
reless sens
or
Co
p
y
rig
h
t
©
2014 In
stitu
t
e o
f
Ad
van
ced
En
g
i
n
eerin
g and
Scien
ce. All
rig
h
t
s reser
ve
d
.
1. Introduc
tion
With wirele
ss commu
nicati
on tech
nolog
y, embedded
cal
c
ulatio
n techn
o
logy and
sen
s
o
r
techn
o
logy in
further devel
opment, wirel
e
ss sen
s
o
r
n
e
twork that consi
s
ted of a large n
u
mbe
r
o
f
intellectu
a
lize
d
se
nsor n
o
d
e
and
got en
ergy by
the b
a
tteries
with wirel
e
ss com
m
unication
a
b
ility
bega
n wid
e
ly to emerg
e
in
national milit
ary, env
iron
m
ent monitori
n
g
and ma
nuf
acturi
ng in all
o
f
sci
entific re
se
arch and soci
al living fields [1].
With the grad
ual devel
opment of ha
rdware desi
g
n
techn
o
logy, these se
nsor node point
s is not onl
y able to re
cei
v
e the perce
ption data from
reali
s
tic worl
d throug
h correspon
ding
sen
s
ors,
b
u
t also able
to filter, ga
ther and
ca
che
effectively to the sen
s
e
d
a
ta re
ceive
d
, took fu
ll
adv
antage
of th
e charac
te
ristics
of net in
ner
treatment, p
e
r
ceive
d
sen
s
e data
to th
e
use
r
s in
ne
ed
by
sen
s
o
r
n
e
twork with
e
nergy
efficien
cy
mech
ani
sm. Any
appli
c
ati
on system ba
sed
on
th
e wi
rele
ss sen
s
or network i
s
in
sep
a
ra
ble fro
m
the mana
ge
ment and
proce
s
s in the
perceptio
n
data [2]. Senso
r
net
wo
rk is a d
a
ta-centri
c
netwo
rk wh
o
s
e b
a
si
c id
ea
is to rega
rd t
he sen
s
or a
s
sen
s
e
data
strea
m
o
r
se
nse
data
sou
r
ce,
take the
sen
s
or a
s
pe
rcept
ion data
spa
c
e or
p
e
rcepti
on datab
ase, kee
p
the dat
a mana
geme
n
t
and process
as the aim of
netwo
rk
a
ppli
c
ation.
A wirele
ss se
nso
r
net
work contain
s
a l
a
rge
numb
e
r
of sen
s
o
r
no
de point
s; ea
ch no
de
colle
cts perce
ption
data at
certai
n time
s
according to
inquiry n
eed. I
n
order to
sto
r
e a
nd ma
na
ge
perceptio
n d
a
ta, it is necessary to b
u
ild dat
a p
r
o
c
essing m
ode
ls for a
w
a
r
e
ness d
a
ta. The
perceptio
n d
a
ta mod
e
ls sh
ould
be
co
nvenie
n
t and
condu
cive to th
e
de
scription
an
d
impleme
n
tation ope
ration
in perceptio
n data inqui
ry [3]. Since perceptio
n d
a
ta is the st
ream
data by conti
nuou
s colle
ction, we
can p
e
rceive data
strea
m
as
a
n
appen
d only
virtual table, in
physi
cal, the
whol
e virtual f
o
rm i
s
lo
cate
d in e
a
ch
no
d
e
device in
n
e
twork,
so it
can be
seen
a
s
a
distrib
u
ted d
a
t
abase sy
ste
m
with
many
perceptio
n d
a
ta tables.
Wirele
ss
se
nso
r
network data
distrib
u
tes a
nd
store
s
on
all n
ode
s, b
u
ilds the i
n
te
rnet
con
n
e
c
tion b
e
twe
en
stora
ge
nod
e
s
,
con
s
titutes a
distrib
u
ted d
a
t
abase. In ord
e
r to ac
hieve
the inqui
ry of data
in the wi
rele
ss
network
at any time a
nd any
pla
c
e
s
, we can
de
sign
a m
obile
databa
se
ba
sed
on th
e
chara
c
te
risti
c
s of
wirel
e
ss
sen
s
or net
wo
rk
da
ta to make th
e data in
quiry
of sen
s
o
r
n
e
twork go
out t
he limitation
o
f
fixed cabl
e n
e
tworks, obt
ain an
d process sen
s
or
netwo
rk i
n
formation at a
n
y
time and
any
places.
The
u
l
timate goal
o
f
data m
anag
ement in
wi
re
less
sen
s
o
r
n
e
twork (WSN) i
s
to
su
ppo
rt
efficient and
reliable d
a
ta storage
and a
c
cess in the
hetero
gen
eo
us, un
reliabl
e
netwo
rk, an
d
to
make full u
s
e limited resource
s of the node
s, and
to provide u
s
ers
with low l
a
tency services.
Data storage
mainly studi
es how
to sa
ve
se
nsor
y data in the network
e
ffectively in order t
o
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
Re
sea
r
ch an
d Reali
z
ation
of Wirele
ss Sensor Netwo
r
ks
Datab
a
se (Ping Liu
)
7439
make
u
s
er o
b
tain pe
rcept
ion data
ea
si
ly and q
u
ickl
y. Data a
c
ce
ss mainly
ref
e
rs to u
s
ing
th
e
efficient sto
r
a
ge method to
reali
z
e the hi
gh e
fficien
cy and en
ergy saving que
ry processin
g
.
Typical wirel
e
ss sen
s
o
r
netwo
rk
(WS
N
)
i
s
sh
own
in Fig
u
re
1
.
A large
nu
mber of
multimedia sensor no
de
s are depl
oye
d
rand
omly
and evenly in the regio
n
whi
c
h is ne
e
d
of
monitori
ng.
Every multim
edia
sen
s
o
r
node
ha
s fu
nction
s
su
ch
as wi
rele
ss com
m
uni
cat
i
on,
comp
utation and stora
ge,
etc.
They
can sponta
n
e
ously form
a
multihop d
a
t
a tran
smissi
on
netwo
rk.
Wh
en re
ceiving
the data coll
ection
comm
and rel
e
a
s
ed
by task ma
nagem
ent no
de,
various multi
m
edia
sensor node will
begin to
co
llect data, and transm
it the data collection
results to gat
her no
de
s Sink alo
ng the data fo
rwardi
ng path esta
blish
ed. Gath
ering n
ode Si
nk
sen
d
s the fin
a
l monitori
ng
results to task mana
gem
e
n
t node by the Internet or
satellite.
Figure 1. Dia
g
ram of Wi
rel
e
ss Sensor
Network
2. The Da
ta
Storag
e of
Wireless Se
nsor Net
w
o
r
ks
Data sto
r
a
ge
in a wirele
ss
sen
s
o
r
netwo
rk resea
r
che
s
stora
ge st
rat
egy in the net
work o
f
perceptio
n d
a
ta pro
d
u
c
ed
by node, in
cluding
ho
w to
store the d
a
ta in their pro
per lo
catio
n
s in
netwo
rk an
d
how qu
ery
re
que
st is ro
ute
d
to the
st
o
r
a
ge lo
catio
n
fo
r the
data. T
h
is i
s
a
c
tually
a
process of i
n
formation intermedi
ary. Information mediation refe
rs to the producer will
save
sen
s
o
r
y data
in a sp
ecific
p
o
sition a
c
co
rding to
certai
n strate
gy, and con
s
u
m
ers
(may be a b
a
s
e
station, al
so
may be a
sensor n
ode
)
route d
a
ta
a
c
cess requ
est to the storage lo
cation
of
relevant d
a
ta
in acco
rda
n
ce with the
correspon
ding
st
rategy, then f
eedb
ack resu
lts whi
c
h
sati
sfy
the qu
ery
co
ndition
s to
custome
r
s. According
to
th
e different
storag
e
strate
g
y
of pe
rcepti
o
n
data, data sto
r
age
can b
e
divided into centrali
z
ed
sto
r
age, lo
cal st
orag
e,
distrib
u
ted storage
and
sen
s
o
r
netwo
rk data
b
a
s
e. Next the four
st
rategi
es
will
be discu
s
sed
resp
ectively.
(1) Ce
ntrali
zed
sto
r
ag
e: Centralized storage
i
s
o
n
e
of the mo
st simple
data
storage
strategi
es. E
a
ch
nod
e tra
n
smits the
collecte
d
pe
rception d
a
ta to ba
se
statio
n (sink
nod
e) for
stora
ge, and
data acce
ss gets the dat
a
directly from
the station. As
a re
sult of unlimited en
e
r
gy
and stora
ge spa
c
e of
the base
stat
io
n, data can b
e
pre
s
e
r
ved for a long time,
and d
a
ta a
c
cess
will not
consume the
energy of t
he nodes i
n
the network. The
se
nsor net
work i
s
only as a
mean
s of d
a
ta coll
ectio
n
rather th
an d
a
t
a pro
c
e
s
sing
, beca
u
se the
use
r
can
onl
y get the dat
a in
the databa
se
from the base
stati
on. In addition, when t
he netwo
rk scale is very la
rge an
d node’
s
distrib
u
tion i
s
den
se, la
rge
amount
of dat
a nee
d to
b
e
tran
smitted in
the network, then the
nod
e
s
near the
ba
se statio
n will
con
s
um
e e
n
e
r
gy qui
ckly
b
y
transmitting
data. At la
st, it can
con
s
titute
a bottlene
ck t
o
the netwo
rk, so this meth
od is not suitable for la
rge
-
scale n
e
two
r
k.
(2) L
o
cal sto
r
age: L
o
cal storage
refe
rs
to
the node
's perceptio
n d
a
ta being
sto
r
ed in it
stora
ge, and
data acce
ss reque
st is rout
ed to all node
s to obtain re
l
e
vant data. This
strategy will
transmit the q
uery requ
est t
o
t
he entire n
e
twork, an
d e
a
ch
nod
e
f
e
e
dba
ck
s
t
he re
sult
s ac
co
rdin
g
to the query con
d
ition. Its advantag
es a
r
e that
data storage i
s
sim
p
le and sto
r
e
d
pro
c
ed
ure i
s
without a
n
y
comm
uni
cati
on ove
r
he
ad,
and
data
a
c
cess i
s
a
kind of o
n
-d
e
m
and
que
ry. Its
sho
r
tco
m
ing
s
are
as foll
o
w
s: first of all
,
the node’
s
stora
ge
ca
pa
city is limited
, so it can't
save
the histo
r
ical data for a lo
n
g
time. Once
a node fa
il
s, the data will
be lost. Secondly, usin
g the
flood ro
uting, query requ
est
is tran
smitte
d blindly
in th
e netwo
rk, so
netwo
rk’
s
life
will be short
e
d
becau
se
of l
a
rge
en
ergy
con
s
um
ption,
so
it
do
es
not ap
ply to
the net
work i
n
which q
uery
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 12, No. 10, Octobe
r 2014: 743
8
– 7444
7440
requ
est
s
h
a
p
pen frequ
ently. Finally, the co
st of
data
transmissio
n
is hig
h
an
d q
uery p
r
o
c
e
ssi
ng
is more com
p
lex.
(3) Di
stri
bute
d
stora
ge: Di
st
ribute
d
storage is a data
-
ce
ntri
c stora
ge strate
gy. Its core
idea is that the sen
s
o
r
y data from nod
e is not al
wa
ys store
d
locally but also store
d
in other
node
s by the
distrib
u
ted tech
nolo
g
y, and ado
pt e
ffective informat
ion mediatio
n
mech
ani
sm
to
coo
r
din
a
te th
e relation
ship
between
the
data
st
orage
and data access,
so data acce
ss
requ
e
s
ts
can be
satisf
ied. Unde
r th
is strate
gy, data is st
ored
in acco
rda
n
ce with
the specifi
c
storag
e
mech
ani
sm,
and q
u
e
r
y re
que
st obtain
s
the data
accordin
g to the
spe
c
ific a
c
cess me
ch
ani
sm.
These m
e
ch
anism
s in
clu
de: ha
sh
m
ap, ind
e
xing,
data
an
d
query
re
que
st bei
ng
ro
u
t
ed
according to
certai
n rul
e
s,
etc.
Its advan
tages a
r
e: the
distribute
d
d
a
ta storage is con
s
iste
nt wi
th
the di
stributio
n of sen
s
o
r
n
e
twork, a
nd t
he info
rmatio
n intermedia
r
y mech
ani
sm
ca
n en
su
re t
hat
the data a
c
ce
ss
req
u
e
s
ts a
r
e satisfied. T
he di
sadvant
age is th
at informatio
n intermedia
r
y need
s
extra c
o
s
t.
(4) Se
nsor
netwo
rk data
base: Sen
s
or net
wo
rk dat
aba
se inte
grates the
ab
o
v
e three
strategi
es. It integrate
s
the
traditional da
tabase
techn
o
logy, distrib
u
ted techn
o
lo
gy and netwo
rk
techn
o
logy
cl
osely. Th
e
se
nso
r
n
ode
is
rega
rd
ed a
s
a pe
rception
data flo
w
o
r
d
a
ta source.
T
h
e
wirel
e
ss sen
s
or net
work (WSN) is rega
rded a
s
a di
stributed data
base. It can achi
eve a se
nso
r
netwo
rk data
base
sy
stem whi
c
h
is
data
-
ce
ntri
c
with high
pe
rfor
m
ance usi
ng t
he logi
c con
c
ep
t
and soft
ware and ha
rd
ware technol
ogy. Senso
r
network d
a
taba
se
is compl
e
me
ntary with dat
a-
centri
c
routin
g. Relative to the data
storag
e an
d a
c
cess, ro
utin
g is bottom
-
u
p
, but relativ
e
to
data modeli
n
g and data
b
a
s
e a
c
cess, the databa
se i
s
top-do
wn.
Data
storage
method
s in
sen
s
o
r
s net
work are divid
ed into th
ree
kind
s
gene
rally: (1)
External storage: Data are
stored in cen
t
re treat
ment
equipm
ent ou
t of s
enso
r
ne
twork togethe
r.
(The
ba
se
station o
r
gate
w
ay)
(2
) Lo
cal sto
r
age:
P
e
rception
dat
a after p
r
od
u
c
tion a
r
e
stored in
sen
s
o
r
no
de.
(3)
Data
-Ce
n
tric Sto
r
age
: Name th
e
perceptio
n d
a
ta, and
sto
r
e in
spe
c
ifi
e
d
positio
n in
se
nso
r
n
e
two
r
k acco
rding
to
the nam
e
of
perce
ption d
a
ta [4]. External sto
r
a
ge i
s
in
the ce
ntrali
ze
d stru
ctu
r
e, a
ll per
ceptio
n
data are sto
r
ed in
conve
r
g
ent nod
es
of external
sen
s
or
netwo
rk, that
is to say, after sen
s
or n
o
des
g
e
t moni
toring d
a
ta, no matter whe
t
her converg
ent
node
s inte
re
st in th
e dat
a, they are
sent to
conve
r
gent nod
es actively.
Wh
en
lo
cal sto
r
age
method
s are use
d
, all perception dat
a a
r
e sto
r
ed in
sensor no
de
s that
prod
uced
the data, i.e. at
first the sen
s
or
nod
e st
ore
s
monito
ri
ng data in
l
o
cal
store, the rel
e
vant data is
sent
to
conve
r
ge
nt code
s after re
ceiving enqui
ry comman
d
s.
Usi
ng
extern
al sto
r
a
ge m
e
thod
s, sen
s
or
node
s tra
n
sfer all
coll
ected
data
to central
node
to
anal
yze a
n
d
process by
pri
o
r
appoi
nted
wa
ys, thoug
h
st
orag
e i
s
sam
p
le, the
cost
of
comm
uni
cati
on is expen
si
ve, and
central and
su
rrou
nding
co
de
s
will be
com
e
t
he bottlen
ecks for
system
pe
rformance, an
d
mean
while
it
may take
so
me data
that
not ne
ede
d t
o
central
no
d
e
s to
cau
s
e
wa
ste
[5]. Usin
g l
o
cal
sto
r
age
method
s, st
oring
pe
rcept
ion data
doe
s not
need
to
con
s
um
e extra comm
uni
ca
tion energy, data throug
h n
e
twork tra
n
smissi
on a
r
e with intereste
d
by
conve
r
ge
nt n
ode
s, but it t
a
ke
s lo
t
s
of e
nergy i
n
data
the qu
ery [6]
.
The
co
st st
ored
aroun
d t
h
e
data is bet
we
en the two fa
ctors.
3. The Da
ta
Quer
y
of Wireless Senso
r
Net
w
o
r
k
s
3.1. The Stru
cture o
f
Data
Manageme
n
t
Sy
stem
At pre
s
ent, th
e st
ru
cture
of
data
man
a
g
e
ment
syste
m
on
tran
sd
u
c
er n
e
two
r
k i
s
divid
ed
into the follo
wing fo
ur
cat
egori
e
s:
Cent
ralized
stru
ct
ure, Semi
-di
s
tributed
stru
cture, Di
strib
u
ted
stru
cture and
Hierarch
i
c
al structu
r
e.
1) Ce
ntrali
ze
d stru
cture
In ce
ntrali
zed
stru
ctu
r
e, th
e
inqui
ry of
sense data
an
d the a
c
ce
ss of
se
nsor net
work are
relatively inde
pend
ent. The
whol
e proce
ss i
s
divid
ed i
n
to two m
a
in
step
s: At first, sen
s
e
data
will
be pe
rceived
to the
central se
rver by
spe
c
ifyi
ng m
e
thod
s from
the sen
s
o
r
ne
twork, an
d th
en
con
d
u
c
t the
query
treatm
ent in th
e
ce
nter
se
rver.
T
h
is
metho
d
i
s
sim
p
le, b
u
t the
cente
r
se
rver
will b
e
the
bo
ttlenecks in
system p
e
rfo
r
mance, a
nd f
ault tole
ran
c
e
is
poo
r. In
a
ddition, b
e
ca
use
the sen
s
o
r
d
a
ta are re
qui
red to the ce
nter se
rver fi
nally, commu
nicatio
n
expe
nse
s
are very
large.
2) Semi-distri
buted st
ructu
r
e
As sen
s
o
r
no
des have th
e
cal
c
ulatio
n an
d sto
r
ag
e fun
c
tion, it can
d
eal with
o
r
igin
al data
on ce
rtain de
gree. Now m
o
st of
the re
search con
c
en
trated on
sem
i
-dist
r
ibute
d
structu
r
e.
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
Re
sea
r
ch an
d Reali
z
ation
of Wirele
ss Sensor Netwo
r
ks
Datab
a
se (Ping Liu
)
7441
3) Di
st
rib
u
t
e
d
st
ru
ct
ure
Distri
buted
st
ructu
r
e
assu
mes th
at ea
ch se
ns
or
ha
s very high
st
orag
e, calculation an
d
comm
uni
cati
on ability. Firstly, each
se
nso
r
sample
s, perceives a
nd monito
rs
ca
se
s, and t
hen
use
s
a ha
sh functio
n
, store
s
them to the sen
s
or
n
ode
s nea
r to the value of the hash fun
c
tion
by
the keyword of each eve
n
t, which is
ca
lled ha
sh
fun
c
tion [7]. Pro
c
e
ssi
ng the q
uery, the sa
me
hash functio
n
is use
d
to send the qu
ery to the
nodes nea
r to the
value of hash function. T
h
is
stru
cture will
put co
mputat
ion an
d
com
m
unicati
on at
the
sen
s
or node point
s. The
p
r
obl
em
o
f
distrib
u
ted
structure i
s
to
a
s
sume
that t
he
se
ns
or
n
o
d
e
ha
s th
e sa
me
c
a
lc
u
l
a
t
io
n
an
d s
t
or
ag
e
ability with ordinary
comp
u
t
ers, di
stribut
ed struct
u
r
e i
s
only suit fo
r the inqui
ry based on ev
ent
keyword
s
, an
d the comm
u
n
icatio
n co
sts of system is
much.
4) Hie
r
a
r
chical stru
cture
Against th
e
sho
r
tco
m
ing
s
of ab
ove
system,
ma
ke
a ki
nd of
hie
r
archy
stru
ct
ure, a
s
s
h
ow
n
in
F
i
gu
r
e
2
.
Figure 2. Hierarchical Structure
This st
ru
cture
contain
s
two
levels: the sens
or net
wo
rk layer an
d a
gen
cy netwo
rk layer,
and inte
grat
es m
u
ltiple
techn
o
logy:
the in
tra
-
n
e
twork
data
pro
c
e
s
sing,
adaptive q
uery
pro
c
e
ssi
ng
a
nd the
qu
ery
pro
c
e
ssi
ng
b
a
se
d o
n
the
conte
n
t. In th
e sen
s
o
r
n
e
twork layers,
each
node ha
s a certain calcula
t
ion and storage ability [8
]. Each sen
s
or nod
e finishes three tasks:
Re
ceive orde
rs fro
m
the a
gen
cy, carry out local
te
rm
s, and tra
n
sm
it the data to the age
ncy. T
he
orde
rs that sensor no
de
s
received in
cl
uded
samp
li
n
g
rate
s, tran
sferrin
g
rate
s
and p
r
ocessi
n
g
that needed t
o
perform. The node
s on the agent laye
r have a gre
a
ter storage, computation a
nd
comm
uni
cati
on ability [9]. Each ag
en
cy complete
s
five tasks:
Receive e
nqui
ries from u
s
ers,
sen
d
control
orde
rs o
r
oth
e
r info
rmatio
n to t
he
se
n
s
or no
de
s, receive
data f
r
om th
e sen
s
or
node
s, proce
ss
que
rie
s
, a
nd retu
rn the
results of
in
quirie
s
to the
use
r
s [1
0]. After the age
ncy
node
s received the d
a
ta from the sen
s
or no
de
s,
a n
u
mbe
r
of ag
e
n
cy no
de
s ha
ndle the
re
su
lts
of enq
uirie
s
at so
me
ste
p
s
and
return the
re
s
u
lt
s to the us
ers
.
This
method dis
t
ributes
comp
utation
and commu
ni
cation ta
sks to all of the nodes.
3.2. Quer
y
Proces
sing a
nd Optimiza
tion
F
i
r
s
t o
f
a
ll, qu
e
r
y pr
oc
es
s
i
n
g
in
s
e
ns
or
netwo
rks n
e
eds th
e supp
ort of the un
derlying
routing
proto
c
ol. It is assumed that th
e rout
in
g tre
e
has
been
establi
s
h
ed b
y
under laye
r to
sup
port
que
ry acce
ss. A
query
pro
c
e
s
s i
s
relea
s
e
d
from th
e top
to do
wn, the
n
the
root
no
de
transmits q
u
e
r
y requ
est
s
to the chil
d n
ode
s, and th
e child
nod
es use b
r
oa
dca
s
t mode to
send
requ
est
s
to
its
child
no
de
s co
ntinuo
usly
until a
rri
vin
g
to the l
eaf n
ode
s. Th
e re
sult i
s
colle
ct
ed
from the bottom up. Firstly
a leaf node send
s t
he re
su
lt to the parent node, and
the pare
n
t no
de
sen
d
s it up
ward
co
ntinuo
u
s
ly, until the
result i
s
fed
b
a
ck to the
ro
ot node
which ha
s p
u
t forward
the query req
uest
s
.
After the que
ry reque
st a
rri
ves to the n
o
de,
the qu
ery
pro
c
e
s
sor
of node
or q
uery proxy
is
re
sp
o
n
s
i
b
l
e
fo
r
e
x
ec
u
t
in
g
it. Q
u
er
y p
r
oc
ess
i
n
g
in
c
l
ud
es
tw
o s
t
a
g
e
s
:
pr
etr
e
a
t
me
n
t
and
executio
n ph
ase. Pre
p
rocessing
stage
mainly ch
e
c
ks the l
egitim
a
cy of the qu
ery req
u
e
s
t a
nd
prep
ares for
query exe
c
uti
on wo
rk. Alth
ough the vali
dity check wo
rk i
s
mostly d
one on the b
a
se
station side, but
be
cau
s
e of
t
he dynami
s
m of net
work, the ba
se
station sid
e
ca
nnot have all
the
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 12, No. 10, Octobe
r 2014: 743
8
– 7444
7442
node
s’ info
rmation in tim
e
, so
so
me l
egitimacy
examination
wo
rk i
s
tran
sferred to
individ
ual
node
s. Prep
aration i
s
m
a
inly to esta
blish a
n
internal data
stru
cture
and all
o
cate n
e
cessary
stora
ge spa
c
e for que
ry executio
n.
Query exe
c
u
t
ion is ge
ne
rally divided
into
four
stages:
starti
ng sta
ge, o
perato
r
’
s
executio
n sta
ge, re
sults t
r
ansfe
r sta
g
e
and
state transitio
n stag
e.
In the be
ginnin
g
of e
a
ch
roun
d, the q
u
e
ry ente
r
s int
o
t
he
start-up
stage,
and t
he sen
s
o
r
's
p
e
rception
co
mpone
nt coll
ects
data, and th
e
n
co
mpute
s
t
he sen
s
ory
d
a
ta ba
sed
on
the ope
rato
r’
s sequ
en
ce i
n
the qu
ery p
l
an
and tran
sfe
r
s the result
s b
y
the routing tree. A
fter the transmissio
n, node
s ent
er into a dormant
state thro
ugh
state tran
sition pha
se. If no re
sult
s
are tran
sferred,
node
s direct
ly enter into the
state tran
sitio
n
stage from acti
ve state to dorm
ant sta
t
e.
In order to
sa
ve ene
rgy,
system m
u
st
weigh
all kind
s
of co
st
to produ
ce a
pl
an
for
th
e
query in the pro
c
e
ss of q
uery pro
c
e
s
si
ng. The que
ry plan assi
g
n
s differe
nt roles to different
node
s i
n
o
r
de
r to
und
erta
ke different ta
sk in
exe
c
utin
g qu
erie
s,
an
d sch
edul
e di
fferent n
ode
s for
data
comm
u
n
icatio
n. If n
o
t sche
dulin
g
,
node
d
o
e
s
not kno
w
wh
en to
sta
r
t re
ceiving
data
f
r
om
neigh
bori
ng
node
s,
so m
o
st of th
e tim
e
it is in
th
e l
i
stenin
g
state
,
and
co
nsu
m
es th
e valu
able
energy. So try to adopt a
variety of optimization
st
rategy in the proce
s
s of que
ry pro
c
e
s
sing
in
orde
r to red
u
c
e the comm
unication cost
and save e
n
e
rgy co
nsum
ption.
4. The Desig
n
on Sy
stem
4.1. The Man
a
ger of Sen
s
or Mode
Figure 3. Co
mpone
nts Structure of Eng
i
ne
Comp
one
nts structu
r
e
of
engi
ne i
s
shown in
Fig
u
r
e
3, sen
s
or mod
e
ma
na
ger is in
cha
r
ge
of m
anagi
ng the
sen
s
o
r
m
ode
of datab
ase
.
We tran
sfer the
sen
s
o
r
model to
virtual
“datab
ase table”, mod
e
contain
s
com
m
and
s t
hat the syste
m
can us
e and t
he su
bprog
ra
m in
update
d
an
d
que
ried
tabl
e a
s
the fo
rmal de
script
i
on of
sen
s
o
r
table. Th
e t
able
doe
sn’t
only
contai
n vario
u
s type
s of
prop
ertie
s
, b
u
t also
i
n
cl
u
des
a g
r
oup
of referen
c
e
s
asso
ciated
with
executa
b
le o
r
der
sets on q
uery a
c
tuato
r
. The group
s
of referen
c
e
s
are
simila
r to the metho
d
of
expandi
ng S
Q
L in
datab
a
s
e
system
of
relative o
b
je
cts. In the
qu
ery p
r
ocessin
g
, put the
da
ta
from sen
s
o
r
on each nod
e into a tuple, these t
uple
s
can b
e
tran
sferred bet
ween the nod
e
s
of
many ro
uting
,
or gath
e
r
d
a
ta, or exp
r
e
ss
co
de to
server-si
de fro
m
the seri
al
of netwo
rk tip.
Senso
r
mo
d
e
mana
ge
r inclu
d
e
s
som
e
com
pon
ent
s: Attr, Com
m
and, Wsn
M
DBAttr, Tu
ple,
WsnMDB
Co
mmand, Qu
e
r
yRe
s
ult. The
function of
Attr is ix and to get prope
rty values; T
he
function
s of Comm
and a
r
e to achi
eve variou
s orders in the mode; Wsn
M
DBAttr is the
con
c
e
n
trato
r
of pro
p
e
r
ties
to co
nne
ct va
riou
s fixed
property
com
p
o
nents in the
d
a
taba
se.
Wh
en
the com
pon
e
n
ts are in
cre
a
se
d to a
c
hie
v
e new in
t
r
in
sic
of the dat
aba
se, Wsn
M
DBAttr nee
ds to
be upd
ated.
WsnMDB
Co
mmand i
s
al
so
the co
ncent
rator of p
r
op
e
r
ties to conn
e
c
t variou
s fixe
d
prop
erty com
pone
nts in the databa
se. Whe
n
t
he co
mpone
nts a
r
e increa
sed t
o
achieve n
e
w
comm
and
s of
the databa
se, Wsn
M
DB
Comm
and n
e
eds to be u
p
dated. Tuple
element
s co
n
t
ain
a
variety
of prog
ram
s
wit
h
tuple data stru
ct
ure in t
he ma
nag
em
ent datab
ase
.
Query
Re
sult
impleme
n
ts the tran
sition
of data struct
ure b
e
tw
e
en
tuple, Que
r
y Re
sult, and
byte string
s.
A
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
Re
sea
r
ch an
d Reali
z
ation
of Wirele
ss Sensor Netwo
r
ks
Datab
a
se (Ping Liu
)
7443
tuple are e
q
u
i
valent to a row in the rel
a
tionshi
p tabl
e, and Que
r
y Result conta
i
ns a tuple a
nd
some meta
da
ta, such a
s
id
number, ind
e
x, etc. Data types of mod
e
manag
er Schem
a sh
ow
in
Table 1.
Table 1. Data
Types of Mo
de Mana
ge
r Schem
a
Data t
y
p
e
s
Defini
tio
n
Void
Used to define th
e command
w
i
thout back
content
INT8 and
UIN
T
8
Eight bit integer
w
i
th ma
rks and
w
i
thout marks
INT16 an
d UNI
T
16
Sixteen bit intege
r
w
i
th marks
and w
i
thout
ma
rks
INT32 an
d UNI
T
32
Thirt
y
-t
w
o
bit inte
ger
w
i
th marks
and w
i
thout
ma
rks
STRIN
G
ASCII character
strings rather
than at the en
d
Query p
r
ocessor in data
b
a
s
e is resp
on
sible
for the co
mpletion of the query processing,
and th
e u
s
ag
e of
storin
g i
n
formatio
n in
the
sen
s
o
r
catalog to
get
the prope
rty
of se
nsor
no
des,
su
ch a
s
re
adi
ng data fro
m
the sen
s
o
r
s, aggregat
in
g and optimi
z
in
g, and then
sendin
g
the d
a
ta
to the master
node [8]. In databa
se, the main eleme
n
ts that are re
spon
sible for t
he part
s
of work
are the
three compo
n
ents: Tu
ple
R
oute
r
, Sel
O
perator
an
d AggOp
e
ra
tor. Tuple
r
o
u
ter
comp
one
nts
provide th
e main qu
ery
pro
c
e
ssi
ng f
unctio
n
in sensor n
ode;
it passes tu
ples
betwe
en va
ri
ous se
nsor
q
uery p
r
o
c
e
ssi
ng
comp
one
nts,
so called
“a
route
r”. T
upleroute
r
is
not
respon
sibl
e f
o
r th
e n
e
two
r
k
route
r
, it is
mainly
respo
n
sibl
e for p
r
o
c
e
ssi
ng
que
ry informatio
n
as
the co
re of d
a
taba
se sy
stem, Tuple
R
o
u
ter ru
ns
in a
single
sen
s
o
r
node, in
clud
ing the re
ceiv
ing
to new a
rrival
enquiry info
rmation and a
nalysi
s
of it
in details: Re
ce
ive the result
s inform
ation
of
adja
c
ent n
o
d
e
s
and
make
local
processing; a
nd t
r
a
n
smit d
ealt d
a
ta to the
ro
ot node. It g
o
t
enqui
ry from
the network,
prod
uced lo
cal state fo
r
th
em, i.e. transf
e
rred the
que
ries to
enq
uiri
es
throug
h the
syntax analysi
s
, and
got re
sults f
r
om th
e local sen
s
o
r
nod
e an
d n
e
ighb
or n
ode
to
provide que
ri
es whi
c
h co
ntains sel
e
cti
on
an
d ag
gregate
s
, the result
s from
queri
e
s
with
out
operation to
g
e
ther
are
sen
t
to the ro
ot n
ode of
a tr
e
e
simply a
nd treat by
qu
ery pro
c
e
s
sor of
root
node.
In ru
nning
p
r
ocess, th
e
databa
se
en
gine
re
ceive
s
contin
ually
so
me ne
ws
pa
ckets
belon
ging to
a que
ry from
a netwo
rk
module
(N
etworkcC
com
pone
nts). In
the re
ceiving
and
grou
ping p
r
o
c
ess, node
s create a Qu
e
r
y data stru
ctu
r
e
to describe t
he que
ry in the con
s
tru
c
tio
n
.
Whe
n
it re
cei
v
ed all the n
e
w
s
pa
ckets o
f
a query,
a
complete Q
u
e
r
y stru
cture
was e
s
tabli
s
h
e
d
,
the datab
ase
engin
e
an
alyzed th
e qu
ery
acco
rding
to
the metad
a
ta
informatio
n o
n
nod
es, b
u
ilt a
ParsedQ
uery
stru
cture in
the de
scriptio
n of enqui
ry and exe
c
utio
n state, and
adde
d it to the
queu
e of the
maintena
nce for en
gine,
prep
are
d
to
carry out o
r
carry out after corre
s
po
n
d
ing
ca
se
s ha
ppe
ned. After q
uerie
s
start,
start the
i
m
pleme
n
tatio
n
pe
riodi
call
y. In the query
executio
n, leaf node
s collect data t
hat que
ry
n
eed
s, filter by the pre
d
i
cate
conditi
on
(SelOp
erato
r
comp
one
nts), and send th
e req
u
ire
d
da
ta to the father no
de
s; the middle no
de
of
routing
tree
s
will repe
at the ope
ratio
n
o
f
the l
eaf n
o
d
e
, if it need
s
an ag
gregati
on o
r
g
r
ou
pin
g
(AggO
perator comp
one
nts), and ca
rry
o
u
t the operation to the re
ceived data a
nd its own da
ta,
the data is ret
u
rne
d
to gath
e
r nod
es in th
e end of ea
ch
cycle.
4.2. The Ne
tw
o
r
k Module
of Da
taba
se
Datab
a
se ne
twork m
anag
er i
s
respon
sible fo
r th
e
network m
anag
ement
and th
e
maintena
nce
of a ro
uting
tree
so a
s
t
o
co
mmuni
ca
te
betwe
en sensor
n
ode
s and conve
r
g
ent
node
s, nod
es and no
des.
Each n
ode in
netwo
rk m
a
i
n
tains a
neig
hbor
nod
e table, and
choo
se
s
a be
st nod
e
as a
father
n
ode to fo
rm routing t
abl
es
[11]. The dat
aba
se e
n
sure
s that e
a
ch
n
ode
in net
work ca
n delive
r
it
s
data to
users in a
n
effi
cie
n
t and
reliabl
e way by
ca
pturing
nei
gh
bor
node
s and m
a
intaining
rou
t
ing tables. Databa
se us
es Netwo
r
k inte
rface to capt
ure an
d co
ntrol
netwo
rk
com
m
unication
s, the T
uple
r
Router of q
u
e
r
y processo
r only
con
n
e
c
ts th
e
Net
w
ork
interface by prop
er Am sendin
g
and referen
c
e
s
, topology and fi
ltering event
s of the network
controlle
r ad
opt a half-int
e
lligent way
to work. As
for the data
messag
es: F
i
rst of all, verify
efficient payl
oad of the
da
ta messa
ge,
and the
n
call
sen
d
Data M
e
ssag
e to ch
oose to hi
s fa
ther
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 12, No. 10, Octobe
r 2014: 743
8
– 7444
7444
node
s
by the
ro
uting
proto
c
ol
s of
many
jump
tra
n
sm
issi
on,
sen
d
a me
ssag
e
with tuple
s
to
the
spe
c
ified a
d
d
r
ess. After da
ta message
s
have finish
ed
, it would trigger a finished
case. As for the
enqui
ry me
ssage
s: First of
all, verify efficient
p
a
yloa
d of the
data
messa
ge, a
nd then
call
an
sen
d
Data M
e
ssag
e req
u
e
s
t enqui
ry in node
s, fina
lly broad
ca
st p
a
rt of messa
ge with en
qui
ries
to his neig
h
b
o
r nod
es. Th
e enqui
ry me
ssage h
a
s fin
i
she
d
, and th
en will trigg
e
r a finished
ca
se.
A tuple or a
data me
ssa
ge receives
data fr
om t
h
e neig
hbo
r n
ode
s an
d tri
ggers
an ev
ent
received. If a messag
e is n
o
t lis
tened, it will trigge
r an
event.
Most of prog
ram code
s in netwo
rk m
anag
er
are use
d
to man
age the stru
cture of
netwo
rk topol
ogy. The
stru
cture
of
net
work topol
ogy
in datab
ase i
s
a
routin
g tree. The
se
nsor
node th
at ID numb
e
r i
s
0
is the
root
node. A n
e
twork m
ana
g
e
r i
s
eq
uivalent to the ro
uting
comp
one
nts in a
datab
ase
to receive d
a
ta, tran
smit data
a
nd que
ry
ma
ssage
s,
data
me
ssag
es
is g
a
the
r
ed
d
a
ta o
r
tupl
e,
the qu
ery
me
ssage
s
re
pre
s
ent
s the
p
a
rt of qu
ery int
o
the
net
work.
Query
ne
ws i
s
b
r
oa
dcaste
d to the
routing tre
e
s,
the
enqui
ry requi
rement p
a
sse
s
d
o
wn fro
m
root
node
s, d
a
ta
messag
es p
r
opag
ates up
to the
r
oot
node
of the
netwo
rk.
The
tree
nod
e i
s
in
cha
r
ge of tra
n
sferrin
g
the query re
sult
s to c
onverge
nt node in the serve
r
sid
e
and appli
c
ation
prog
ram
s
. In
orde
r to
achie
v
e the comm
unication
rule
s of a
bove
ro
uting
tre
e
s, n
e
twork mana
ger
use
s
a simpl
e
maintena
nce algorithm o
f
routi
ng tree
s. The algo
rithm make
s e
a
ch
sen
s
o
r
nod
e
kee
p
a nei
gh
bor tabl
e, an
d sele
cts
a n
ode in
the n
e
i
ghbo
r no
des as its fathe
r
node in
routi
n
g
trees.
5. Conclusio
n
This
articl
e rese
arche
d
th
e de
sign
of dat
aba
se sy
stem
b
a
sed on
wi
rele
ss sen
s
o
r
netwo
rk m
a
n
ageme
n
t refe
rrin
g
to data
manag
eme
n
t in wirel
e
ss
sen
s
o
r
net
wo
rk. Provid
e the
system stru
ct
ure
of Ws
nM
DB and
all th
e functio
nal
module
s
a
nd
resea
r
ch dee
ply the histo
r
i
c
al
stora
ge meth
od of data stream in wi
rele
ss
sen
s
o
r
net
work, ado
pt the mana
gem
ent method with
the com
b
inat
ion of sa
mpli
ng sto
r
ag
e a
nd gath
e
ri
n
g
value sto
r
a
ge to histo
r
i
c
al data in d
a
ta
strea
m
to su
pport the g
a
therin
g enq
uiry to the
historical data
in data
stream. De
sign
o
r
din
a
ry
node end
in wirel
e
ss se
nsor
n
e
two
r
k, server
end
in
mobile
datab
ase
at gath
e
ring no
de
s a
n
d
mobile
client
end that can
impleme
n
t the sy
stem, fo
cus on
de
signi
ng que
ry ma
nage
r, storag
e
module
s
an
d synchro
nou
s
module at server
end in mo
bile datab
ase
at gathering
node
s.
Referen
ces
[1]
Kamel M, Se
li
m S Z
.
Implementatio
n of I
T
-room
enviro
n
ment mo
nitori
ng s
y
stem b
a
s
ed o
n
w
i
r
e
l
e
ss
sensor n
e
t
w
ork
.
2001; 27(
3): 421-4
28.
[2]
Z
adeh L. A W
i
reless Se
nsor N
e
t
w
o
r
k No
de a
nd Re
aliz
atio
n Method.
20
03;
8: 338- 35
3.
[3]
Kamel M, S
e
li
m SZ
. A Desig
n
an
d Impl
eme
n
tation
of W
i
rel
e
ss Sens
or Ga
te
w
a
y for Effici
ent Quer
yi
n
g
and Ma
na
gin
g
throug
h W
o
rld
W
i
de W
eb. 20
01; 61: 17
7-18
8.
[4]
A l- Sultan KS
, Selim SZ
. Desig
n
an
d impl
ement
ati
on of
w
i
rel
e
ss sens
o
r
net
w
o
rk gat
e
w
a
y
.
199
3;
26(9): 13
57-
13
61.
[5]
Mi
yamo to
S, N ak
a
y
ama
K. T
he Enviro
nmea
ntal M
oni
toring S
y
st
em
for Green
ho
u
s
e Bas
ed
on
W
i
reless Se
ns
or Net
w
ork M a
n
. C
y
bern
e
t. 2005; 16(
3): 479
-482.
[6]
Bezdek J C, H
a
tha
w
a
y
R, Sa
binM, T
u
ckerW
. Discu
ssio
n
of Data Man
a
g
e
m
ent T
e
chnolo
g
y
in W
i
rel
e
ss
Sensor. 20
02;
17(5): 87
3-8
7
7
.
[7]
Ming C
h
e
n
. Energ
y
Effici
ent Ro
uting
Protocol i
n
Mobil
e
Si
nk W
i
reless S
ens
o
r
Net
w
orks.
T
E
LKOMNIKA Indon
esi
an Jou
r
nal of Electric
al Eng
i
ne
eri
n
g
.
2012; 1
0
(8): 2
056- 2
0
6
2
.
[8]
J Greensmith, U Aickelin. Self-po
w
e
r
e
d
W
i
rele
ss Sens
or Net
w
ork fo
r Environme
n
t
Monitorin
g
,
Procee
din
g
s of
the Genetic an
d Evoluti
o
n
a
ry Co
mp
utation C
onfere
n
ce (GECCO).
2007: 4
9–5
6.
[9]
SHENG Qing
h
ong, Z
H
ANG J
i
an
qin
g
, XIAO
Hui.
A Ne
w
Ap
proac
h for Seg
m
entatio
n of F
o
rest Imag
e
Based
on
the
Color
a
nd T
e
xture.
Geo
m
atic
s an
d Infor
m
at
ion
Scie
nce
of W
uha
n U
n
ive
r
sity
. 2
0
08;
33(3): 30
6-3
0
9
.
[10]
Gamal a
bde
l fade
el kh
al
af. Energ
y
Effici
e
n
t A
ppro
a
ch t
o
T
a
rget Loca
lisatio
n i
n
W
i
reless S
enso
r
Net
w
orks.
T
E
L
K
OMNIKA Indones
ian J
ourn
a
l of Electrica
l
Engi
neer
in
g
. 2013; 2(3): 2
68-
277.
[11]
P Matzinger. D
a
tabas
e T
e
chnolo
g
y
in W
i
rel
e
ss Sensor Net
w
o
r
ks. 200
3; (12): 991
–1
045.
Evaluation Warning : The document was created with Spire.PDF for Python.