A method and system for establishing a situation for use in an event-driven application
receives one or more events, and queries an external database for obtaining auxiliary
data defining relevant external knowledge for detecting the situation. The event
or events are integrated with the auxiliary data for generating a composite event
defining the situation. The database query is constructed in real time based on
the received events with a query language using SQL primitives.