Sensor networks provide means to link people with real world, by collecting data of real world in real time, processing online, and routing to the right people. Application examples include continuous monitoring of environment, infrastructure and human health. In the monitoring tasks, users view the sensor networks as databases, and the monitoring tasks are performed as subscriptions, queries, and alert definitions. However, databases can only deal with well-formed data types, and well-defined schema for its interpretation. There is a gap between the databases and the raw data collected by the sensor networks. In order to fill the gap, this paper proposes a novel approach, referred to as "spatiotemporal data stream segmentation", or "stream segmentation" for short. Stream segmentation is defined using Bayesian Networks in the context of sensor networks, and demonstrated using a human activity monitoring system.