Wireless sensor networks (WSN) are a recent technology aimed at the automation of environmental monitoring by means of highly distributed, low-cost and wireless sensors. Some WSN paradigms provide a unified organization of WSN by combining database technologies with WSNs. In these paradigms the database to be queried is the physical environment where the WSN is deployed. These approaches abstract specific sensor features and offer to the applications an SQL-like query language through which it can program the network and access the sensed data. More recently the same approach has been extended to the tracking of composite, moving events.
Under this trend of research we identify data collection, intra-sensor and inter-sensor communication as recurring activities in WSN applications and propose a layered approach in which the lower layer models the communications and the sampling functions of the sensors in terms of streams, and the upper layer performs query processing on streams. The MaD-WiSe system is a wireless sensor network database based on this approach and designed to perform in-network distributed query processing. The talk describes the MaD-WiSe system, and discusses its extension for the tracking of moving events.