ATLAS: a Small but Complete Extension of SQL for Data Streams and Data Mining We propose simple extensions of SQL to support (i) continuous queries on streaming data, and (ii) complex applications on  persistent data stored in a database. The linchpin of our approach is a native extensibility mechanism for SQL based on user-defined aggregates (UDAs) and table functions. This makes ATLAS Turing complete---without coding external functions or embedding queries in a procedural language. Because of this power, and the stream-oriented computation model of UDAs, very complex continuous queries on streams can be supported with minimal extensions to SQL. Furthermore, the notion of safe and non-blocking computations on infinite data streams can be formally characterized in this context. The ATLAS prototype optimizes response time and/or throughput on data streams taking users' input into account.