Skip to main content
Log in

Teaching model-driven engineering from a relational database perspective

  • Special Section Paper
  • Published:
Software & Systems Modeling Aims and scope Submit manuscript

Abstract

We reinterpret MDE from the viewpoint of relational databases to provide an alternative way to understand, demonstrate, and teach MDE using concepts and technologies that should be familiar to undergraduates. We use (1) relational database schemas to express metamodels, (2) relational databases to express models, (3) Prolog to express constraints and M2M transformations, (4) Java tools to implement M2T and T2M transformations, and (5) Java to execute transformations. Application case studies and a user study illuminate the viability and benefits of our approach.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17

Similar content being viewed by others

Notes

  1. Specifically EMT, Graphical Modeling Tooling Framework Plug-in, OCL Tools Plug-in, and Eugenia for Eclipse 3.6.2.

  2. Admittedly, this statement holds for IDEs in general, and Eclipse in particular.

  3. Prolog tuples can have unquoted atoms (\(\mathtt{james}\)) and quoted atoms (‘\(\mathtt{James~Tiberius}\)’).

  4. The code for MDELite, including all of our T2M transformations, is free at http://www.cs.utexas.edu/users/schwartz/MDELite/index.html.

  5. The set of icons that one can drag and drop onto a canvas to create instances.

  6. Also known as megamodels [13] and tool chain diagrams [32].

  7. The only oddity of Fig. 14a is the domain \(\mathtt{SDBPL \times SDBPL}\), which is the cross-product of the SDBPL domain with itself. The merge arrow composes two SDBPL databases into a single SPBPL database (i.e., \(\mathtt{merge: SDBPL \times SDBPL \rightarrow SDBPL}\)).

  8. SDBPL tables classImplements, interfaceExtends, interface have no tuples. The Prolog declaration :- dynamic T/n. states that prolog tuples for table T with n attributes are empty.

  9. In some research, the term cohort is also used to refer to any group that is repeatedly measured over time, as in a longitudinal or panel study; however, this is a different use of the term [21, 35].

  10. Nine out of the 12 students chose to give their background information.

  11. Two documents \(\mathtt{d}_\mathtt{1}\) and \(\mathtt{d}_\mathtt{2}\) can differ in whitespace, ordering of declarations, etc. and still represent equivalent class diagrams.

  12. The undergraduate class is not MDE-specific, but is intended to cover and explain a wide spectrum of software development and design approaches.

  13. The Eclipse OCL tool plugin is similar in that one has to manually enter tuples beforehand before OCL queries can be executed. This is impractical, even for classroom settings.

References

  1. Almendros-Jiménez, J.M., Iribarne, L.: A Framework for Model Transformation in Logic Programming. In: VIII Jornadas sobre Programación y Lenguajes (PROLE 2008), Gijón, Spain, pp. 29–39 (2008)

  2. Almendros-Jiménez, J.M., Iribarne, L.: A model transformation language based on logic programming. In: 39th International Conference on Current Trends in Theory and Practice of Computer Science (SOFSEM 2013), Špindlerův Mlýn, Czech Republic. Lecture Notes in Computer Science, vol. 7741. Springer, pp. 382–394 (2013)

  3. Almendros-Jiménez, J.M., Iribarne, L.: ODM-based UML model transformations using Prolog. In: International Workshop on Model-Driven Engineering, Logic and Optimization: friends or foes? (MELO 2011), in conjunction with the 7th European Conference on Modelling Foundations and Applications (ECMFA 2011), Birmingham, UK. Lecture Notes in Computer Science, vol. 7741. Springer, pp. 382–394 (2013)

  4. Apache Velocity Project. http://velocity.apache.org/. Accessed Apr 2015

  5. Basili, V.R.: Software Modeling and Measurement: the Goal/Question/Metric Paradigm. Tech. rep., University of Maryland (1992)

  6. Batory, D.: Multilevel models in model-driven engineering, product lines, and metaprogramming. IBM Syst. J. 45(3), 527–540 (2006)

    Article  Google Scholar 

  7. Batory, D., Azanza, M.: Catalina: A Next-Generation of MDELite. Tech. Rep. UTCS TR-15-06, University of Texas at Austin (2015)

  8. Batory, D., Azanza, M., Saraiva, J.: The objects and arrows of computational design. In: 11th International Conference on Model Driven Engineering Languages and Systems (MoDELS 2008), Toulouse, France. Lecture Notes in Computer Science, vol. 5301. Springer, pp. 1–20 (2008)

  9. Batory, D., Gonçalves, R., Marker, B., Siegmund, J.: Dark knowledge and graph grammars in automated software Design. In: 6th International Conference on Software Language Engineering (SLE 2013), Indianapolis, IN, USA. Lecture Notes in Computer Science, vol. 8225. Springer, pp. 1–18 (2013)

  10. Batory, D., Latimer, E., Azanza, M.: Teaching model driven engineering from a relational database perspective. In: 16th International Conference on Model-Driven Engineering Languages and Systems (MODELS 2013), Miami, FL, USA. Lecture Notes in Computer Science, vol. 8107. Springer, pp. 121–137 (2013)

  11. Baughman, M.: The influence of scientific research and evaluation on publishing educational curriculum. New Dir. Eval. 117, 85–94 (2008)

    Article  Google Scholar 

  12. Bézivin, J., France, R.B., Gogolla, M., Haugen, Ø., Taentzer, G., Varró, D.: Teaching modeling: why, when, what? In: Workshops and Symposia at the 12th International Conference on Model Driven Engineering Languages and Systems (MoDELS 2009), Denver, CO, USA, Reports and Revised Selected Papers. Lecture Notes in Computer Science, vol. 6002. Springer, pp. 55–62 (2009)

  13. Bézivin, J., Jouault, F., Valduriez, P.: On the Need for Megamodels. In: OOPSLA/GPCE Workshop on Best Practices for Model-Driven Software Development (MDSD 2004) in conjuction with the 19th Annual ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2004), Vancouver, Canada (2004)

  14. Boruch, R.: Encouraging the flight of error: ethical standards, evidence standards, and randomized trials. New Dir. Eval. 2007, 55–73 (2007)

    Article  Google Scholar 

  15. Brosch, P., Kappel, G., Seidl, M., Wimmer, M.: Teaching model engineering in the large. In: 5th Educators’ Symposium in conjunction with the 12th International Conference on Model Driven Engineering Languages and Systems (MoDELS 2009), Denver, CO, USA (2009)

  16. Cook, T.D.: Why have educational evaluators chosen not to do randomized experiments? Ann. Am. Acad. Polit. Soc. Sci. 589(1), 114–149 (2003)

    Article  Google Scholar 

  17. Dehayni, M., Féraud, L.: An approach of model transformation based on attribute grammars. In: 9th International Conference on Object-Oriented Information Systems (OOIS 2003), Geneva, Switzerland. Lecture Notes in Computer Science, vol. 2817. Springer, pp. 412–423 (2003)

  18. Diskin, Z.: Algebraic models for bidirectional model synchronization. In: 11th International Conference on Model Driven Engineering Languages and Systems (MoDELS 2008), Toulouse, France. Lecture Notes in Computer Science, vol. 5301. Springer, pp. 21–36 (2008)

  19. Dot Language. http://www.graphviz.org/content/dot-language. Accessed Apr 2015

  20. Favre, J.M.: Towards a basic theory to model driven engineering. In: 3rd Workshop in Software Model Engineering (WISME 2004) in conjuction with the 7th International Conference on the Unified Modeling Language (UML 2004), Lisbon, Portugal (2004)

  21. Fraenkel, J.R., Wallen, N.E.: How to Design and Evaluate Research in Education. McGraw-Hill, New York (2009)

    Google Scholar 

  22. France, R.B.: Teaching programming students how to model: challenges & opportunities. In: Keynote Speaker at the 7th Educators’ Symposium in conjunction with the 14th International Conference on Model Driven Engineering Languages and Systems (MoDELS 2011), Wellington, New Zealand (2011)

  23. Hainaut, J.: The transformational approach to database engineering. In: 1st International Summer School on Generative and Transformational Techniques in Software Engineering (GTTSE 2005), Braga, Portugal. Revised Papers. Lecture Notes in Computer Science, vol. 4143. Springer, pp. 95–143 (2005)

  24. Handlebars Template Project. http://handlebarsjs.com/. Accessed Apr 2015

  25. ISO/IEC: Software Engineering—Software Product Quality—Part 1: Quality Model (2001)

  26. Jedlitschka, A., Pfahl, D.: Reporting guidelines for controlled experiments in software engineering. In: International Symposium on Empirical Software Engineering (ISESE 2005), Noosa Heads, Australia. IEEE, pp. 95–104 (2005)

  27. Johnson, P.: Human Computer Interaction: Psychology, Task Analysis, and Software Engineering. McGraw-Hill, New York (1992)

    Google Scholar 

  28. Jouault, F., Allilaire, F., Bézivin, J., Kurtev, I.: ATL: a model transformation tool. Sci. Comput. Program. 72(1–2), 31–39 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  29. Kieler Web Service Tool. http://rtsys.informatik.uni-kiel.de/confluence/display/KIELER/Downloads+-+KIELER+Web+Service+Tool. Accessed Apr 2015

  30. McKeachie, W.J.: Research on college teaching: the historical background. J. Educ. Psychol. 82, 189–200 (1990)

    Article  Google Scholar 

  31. Oetsch, J., Pührer, J., Seidl, M., Tompits, H., Zwickl, P.: VIDEAS: a development tool for answer-set programs based on model-driven engineering technology. In: 11th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR 2011), Vancouver, Canada. Lecture Notes in Computer Science, vol. 6645. Springer, pp. 382–387 (2011)

  32. Oldevik, J.: UMT: UML Model Transformation Tool Overview and User Guide Documentation. http://umt-qvt.sourceforge.net/docs/UMT_documentation_v08.pdf. Accessed Apr 2015 (2004)

  33. Pantel, M.: Private Email Conversation (2013)

  34. Pierce, B.: Basic Category Theory for Computer Scientists. MIT Press, Cambridge (1991)

    MATH  Google Scholar 

  35. Shadish, W., Cook, T., Campbell, D.: Experimental and Quasi-experimental Designs for Generalized Causal Inference. Cengage Learning, Boston (2002)

    Google Scholar 

  36. Sprinkle, J., Rumpe, B., Vangheluwe, H., Karsai, G.: Metamodelling: state of the art and research challenges. In: Model-Based Engineering of Embedded Real-Time Systems. International Dagstuhl Workshop, Dagstuhl Castle, Germany, 2007. Revised Selected Papers. Lecture Notes in Computer Science, vol. 6100. Springer, pp. 57–76 (2010)

  37. Störrle, H.: A prolog-based approach to representing and querying software engineering models. In: Workshop on Visual Languages and Logic (VLL 2007) in conjunction with the IEEE Symposium on Visual Languages and Human Centric Computing (VL/HCC 2007), Coeur d’Aléne, Idaho, USA. CEUR Workshop Proceedings, vol. 274. CEUR-WS.org, pp. 71–83 (2007)

  38. SWI-Prolog. http://www.swi-prolog.org/. Accessed Apr 2015

  39. UML Factory. http://www.umlfactory.com/. Accessed Jun 2012

  40. Violet UML Editor. http://alexdp.free.fr/violetumleditor/page.php. Accessed Apr 2015

  41. Walser, T.M.: Quasi-experiments in schools: the case for historical cohort control groups. Pract. Assess. Res. Eval. 19(6), 1–7 (2014)

    Google Scholar 

  42. yUML Beta. http://yuml.me/

Download references

Acknowledgments

We thank the SoSyM referees for very constructive reviews of our initial draft; in a time where writing unconstructive, uninformed negative reviews has become a sport, these referees took their jobs seriously, for which we are grateful.

We are indebted to S. Trujillo (Ikerlan), O. Diaz (UPV/EHU), P. Stevens (Edinburgh), J. Siegmund (Passau) and L. Vozmediano (UPV/EHU) for their insightful comments on earlier drafts of this paper. We also appreciate the help given by M. Spönemann on the Kieler graph layout tools and R. Lämmel his invaluable help answering questions about Prolog. We also thank R. Berg, E. Huneke, A. Shali, and J. Ho for creating VM2T and thank J. Croy, D. Ilijev, B. Koo, E. Liu, T. McCandless, M. Parikh, C. Orchard, C. Salisbury, A. Sharp, J. Siu, C. Stewart, and M. Teng for participating in the user evaluation. We gratefully acknowledge support for this work by NSF grants CCF-1421211, CCF-0724979, and OCI-1148125, the Spanish Ministry of Education, and the European Social Fund under contract TIN2011-23839.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Don Batory.

Additional information

Communicated by Dr. Moreira and Dr. Schätz.

Appendices

Appendix 1: \(\mathbf{Families}_\mathtt{2}\mathbf{Persons}\) application

\(\mathbf{Families}_\mathtt{2}\mathbf{Persons}\) is a simple M2M application. A family database, consisting of two tables family and member, is transformed into a persons database, consisting of the male and female tables. Figure 18a, b shows the schema and tuples of the family and persons databases, respectively. The M2M rules in Prolog are given in Fig. 18c.

Fig. 18
figure 18

Families to Persons

Appendix 2: An illustrative M2M example

Consider Fig. 19a shows an aggregation hierarchy: Each course has a number of offerings, and each offering has students and instructors. Using the rules of Sect. 2, the schema of b is produced from a. The primary or partial keys of each table are indicated in a by ‘Key’ and are underlined in b. To map this to a proper set of relational tables, where MDELite internal identifiers are absent and only primary or compound keys are present in tuples as in c, we need a M2M transformation.

The Prolog program that translates schema (b) to (c) is listed below:

figure h
Fig. 19
figure 19

Database normalization transformation

Appendix 3: Illustrative VM2T application

The VM2T script that converts an FSM Prolog database into executable source is given below.

figure i

The Java code for class drink is shown below:

figure j

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Batory, D., Azanza, M. Teaching model-driven engineering from a relational database perspective. Softw Syst Model 16, 443–467 (2017). https://doi.org/10.1007/s10270-015-0488-7

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-015-0488-7

Keywords

Navigation