Skip to main content

S4J - Integrating SQL into Java at Compiler-Level

  • Conference paper
  • First Online:
Information and Software Technologies (ICIST 2016)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 639))

Included in the following conference series:

Abstract

Object-oriented languages and relational database systems dominate the design of modern enterprise information systems. However, their interoperability has caused problems ever since. In this paper, we present an approach to integrate SQL into the Java programming language. The integration is done at compiler level, making SQL a first-class citizen of the programming language, including object-awareness, providing validation possibilities that cover e.g. query correctness and type compatibility. In contrast to existing solutions, these validations are carried out during compilation. To evaluate our approach, we implemented a standard business process (Order-To-Pay) using Hibernate, JDBC, and S4J. We compare each implementation in terms of query performance, code size, and code complexity. The evaluation shows that the integration of SQL into Java allows to reduce code size and complexity while maintaining an equal or better performance compared to competitive approaches.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/sebastianoe/s4j.

  2. 2.

    http://hibernate.org.

  3. 3.

    https://github.com/JSQLParser/JSqlParser.

  4. 4.

    https://github.com/sebastianoe/s4j-otp-demo.

References

  1. Bauer, C., King, G.: Java Persistance with Hibernate. Dreamtech Press (2006)

    Google Scholar 

  2. Fowler, M.: Patterns of Enterprise Application Architecture. Addison-Wesley Longman Publishing Co., Inc., Boston (2002)

    Google Scholar 

  3. Gale, D., Shapley, L.S.: College admissions and the stability of marriage. Am. Math. Monthly 69(1), 9 (1962)

    Article  MathSciNet  MATH  Google Scholar 

  4. Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Language Specification, 3rd edn. Addison-Wesley Professional, Reading (2005)

    MATH  Google Scholar 

  5. Gusfield, D., Irving, R.W.: The Stable Marriage Problem: Structure and Algorithms, vol. 54. MIT Press, Cambridge (1989)

    MATH  Google Scholar 

  6. Halstead, M.H.: Elements of Software Science (Operating and Programming Systems Series). Elsevier Science Inc., New York (1977)

    MATH  Google Scholar 

  7. Hamilton, G.: JavaBeans, vol. 1. Sun Microsystems, Mountain View (1997)

    Google Scholar 

  8. Hamilton, J.: Java and jdbc: tools supporting data-centric business application development. In: Proceedings of the Fourth International Symposium on Assessment of Software Tools, pp. 121–138, May 1996

    Google Scholar 

  9. Ireland, C., Bowers, D., Newton, M., Waugh, K.: A classification of object-relational impedance mismatch. In: First International Conference on Advances in Databases, Knowledge, and Data Applications, 2009, pp. 36–43. IEEE (2009)

    Google Scholar 

  10. Keller, A.M., Jensen, R., Agarwal, S.: Persistence software: bridging object-oriented programming and relational databases (1993)

    Google Scholar 

  11. X/Open Company Limited: Data management: SQL call level interface (CLI) (1995)

    Google Scholar 

  12. Lombardo, S., Di Nitto, E., Ardagna, D.: Issues in handling complex data structures with nosql databases. In: 14th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, 2012, pp. 443–448. IEEE (2012)

    Google Scholar 

  13. Matzke, B.: ABAP: die Programmiersprache des SAP-Systems R/3. Pearson Deutschland GmbH (2002)

    Google Scholar 

  14. McCabe, T.: A complexity measure. IEEE Trans. Softw. Eng. SE–2(4), 308–320 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  15. McVitie, D.G., Wilson, L.: Stable Marriage Assignment for Unequal Sets, pp. 295–309 (1970)

    Google Scholar 

  16. Meijer, E., Beckman, B., Bierman, G.: LINQ: reconciling object, relations and xml in the .NET framework. In: Proceedings of the 2006 ACM SIGMOD international conference on Management of data, p. 706. ACM (2006)

    Google Scholar 

  17. Melton, J., Eisenberg, A.: Understanding SQL and Java Together: a Guide to SQLJ, JDBC, and Related Technologies. Morgan Kaufmann, San Francisco (2000)

    Google Scholar 

  18. Mohan, C.: History repeats itself: sensible and NonsenSQL aspects of the NoSQL hoopla. In: Proceedings of the 16th International Conference on Extending Database Technology, pp. 11–16. ACM (2013)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Keven Richly .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Richly, K., Lorenz, M., Oergel, S. (2016). S4J - Integrating SQL into Java at Compiler-Level. In: Dregvaite, G., Damasevicius, R. (eds) Information and Software Technologies. ICIST 2016. Communications in Computer and Information Science, vol 639. Springer, Cham. https://doi.org/10.1007/978-3-319-46254-7_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-46254-7_24

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-46253-0

  • Online ISBN: 978-3-319-46254-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics