We describe how a functional database programming language can be extended with transactions and ECA-rules. Fundamental requirements of such an extension are that the declarative semantics of the language not be comparised, that the syntax of the language not be disrupted unduly, and that impedance mismatch problem be avoided. we define what we mean by events, conditions and actionsand describe the semantic of ECA-rules with reference to event detection, parameter-binding, transaction scheduling and abort handling. We define the execution semantics for the ECA system in the language itself. These semantics form the basis of our implementation of the ECA system.