Formalization and Detection of Events over a Sliding Window in Active Databases Using Interval-Based Semantics