A new ANSI-SQL standard has been released, named SQL-AOP 2015. The aim of this sub-spec is to take SQL to the next level, and enable AOP support. Now, your DBA can package cross cutting concerns in “stored aspect libraries” in the database.
Some of the features include:
- Rich pointcut language for SQL
- Capture before/after/around advice on any SQL statement
- Advise PL/SQL, T-SQL, or other code
- Force caching semantics based on AOP policy advice
- TX semantics
- Security filters (including: instance based)
You can capture rich semantics such as:
Before the trigger named ‘foo’ causes a change to index ‘x’ make sure that you update ‘bar’
Load up the cache for tables x, y, and z, when a SELECT captures fields f1, and f2, on table t1
Larry Ellison was quoted as saying:
SQL-AOP is going to revolutionize the world of computing. The database is the network. Finally, my vision of the network computer can come to fruition and I can finally make fun of my good friend Steve Jobs.
A developer at TheServerSide symposium responded with:
Finally, I can get rid of the logging code that I scatter in my PL/SQL scripts. This is a god-send for database computing.
Microsoft SQL Server specialists commented that:
We are watching the standard closely, and will only copy from those that go before us. We also have MSSQL-AOP that we are working on, that is similar to this standard, but we changed some of the names, and embedded it into the core .NET framework.