An Approach to Model and Query Event-Based Temporal Data