Generating SQL Queries from SBVR Rules
Declarative technologies have made great strides in expressivity between SQL and SBVR. SBVR models are more expressive that SQL schemas, but not as imminently executable yet. In this paper, we complete the architecture of a system that can execute SBVR models. We do this by describing how SBVR rules can be transformed into SQL DML so that they can be automatically checked against the database using a standard SQL query. In particular, we describe a formalization of the basic structure of an SQL query which includes aggregate functions, arithmetic operations, grouping, and grouping on condition. We do this while staying within a predicate calculus semantics which can be related to the standard SBVR-LF specification and equip it with a concrete semantics for expressing business rules formally. Our approach to transforming SBVR rules into standard SQL queries is thus generic, and the resulting queries can be readily executed on a relational schema generated from the SBVR model.
KeywordsSBVR SQL Declarative Programming Business Rules Predicate Calculus Formal Semantics
Unable to display preview. Download preview PDF.
- 1.Ross, R.G.: The Business Rules Manifesto. Business Rules Group. Version 2 (2003)Google Scholar
- 2.Object Management Group, “Semantics of Business Vocabulary and Rules Formal Specification v1.0, OMG document formal/08-01-02 (January 2008), http://www.omg.org/spec/SBVR/1.0/ (accessed: 14/5/2010)
- 3.Open Philosophies for Associative Autopoietic Digital Ecosystems, Automatic code structure and workflow generation from natural language models (2008), http://files.opaals.eu/OPAALS/Year_2_Deliverables/WP02/D2.2.pdf (14/5/2010)
- 8.Codd, E.F.: Relational Completeness of Data Base Sublanguages. In: Dustin, R.J. (ed.) Proc. Courant Computer Science Symposia Series, vol. 6. Prentice Hall, Englewood Cliffs (1972)Google Scholar
- 11.Halpin, T.A.: A Logical Analysis of Information Systems: Static Aspects of the Data-Oriented Perspective. PhD Thesis, University of Queensland (1989)Google Scholar