Advertisement

Generating SQL Queries from SBVR Rules

  • Sotiris Moschoyiannis
  • Alexandros Marinos
  • Paul Krause
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6403)

Abstract

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.

Keywords

SBVR SQL Declarative Programming Business Rules Predicate Calculus Formal Semantics 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Ross, R.G.: The Business Rules Manifesto. Business Rules Group. Version 2 (2003)Google Scholar
  2. 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. 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)
  4. 4.
    Marinos, A., Krause, P.: An SBVR Framework for RESTful Web Applications. In: Governatori, G., Hall, J., Paschke, A. (eds.) RuleML 2009. LNCS, vol. 5858, pp. 144–158. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  5. 5.
    Gilbert, D., Tafarodi, R., Malone, P.: You can’t not believe everything you read. Journal of Personality and Social Psychology 65(2), 221–233 (1993)CrossRefGoogle Scholar
  6. 6.
    Date, C.J.: An Introduction to Database Systems. Addison-Wesley, Reading (2004)zbMATHGoogle Scholar
  7. 7.
    Marinos, A., Krause, P.: An SBVR Framework for RESTful Web Applications. In: Governatori, G., Hall, J., Paschke, A. (eds.) RuleML 2009. LNCS, vol. 5858, pp. 144–158. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  8. 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
  9. 9.
    Huth, A.R.A., Ryan, M.D.: Logic in Computer Science: Modelling and reasoning about systems. Cambridge University Press, Cambridge (2002)zbMATHGoogle Scholar
  10. 10.
    Nakano, R.: Translation with Optimization from Relational Calculus to Relational Algebra having Aggregate Functions. ACM Tran. on Database Systems 15(4), 518–557 (1990)MathSciNetCrossRefGoogle Scholar
  11. 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
  12. 12.
    Bloesch, A.C., Halpin, T.A.: ConQuer: a Conceptual Query Language. In: Thalheim, B. (ed.) ER 1996. LNCS, vol. 1157, pp. 121–133. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  13. 13.
    Kleiner, M., Albert, P., Bezivin, J.: Parsing SBVR-based Controlled Languages. In: Schürr, A., Selic, B. (eds.) MODELS 2009. LNCS, vol. 5795, pp. 122–136. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  14. 14.
    Demuth, B., Liebau, H.-B.: An Approach for Bridging the Gaps Between Business Rules and the Semantic Web. In: Paschke, A., Biletskiy, Y. (eds.) RuleML 2007. LNCS, vol. 4824, pp. 119–133. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  15. 15.
    Cabot, J., Pau, R., Raventos, R.: From UML/OCL to SBVR Specifications: A Challenging Transformation. Information Systems 35, 417–440 (2010)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Sotiris Moschoyiannis
    • 1
  • Alexandros Marinos
    • 1
  • Paul Krause
    • 1
  1. 1.Department of ComputingFEPS, University of SurreyGuildford, SurreyUnited Kingdom

Personalised recommendations