Skip to main content

Implementing a Graph Transformation Engine in Relational Databases


We present a novel approach to implement a graph transformation engine based on standard relational database management systems (RDBMSs). The essence of the approach is to create database views for each rule and to handle pattern matching by inner join operations while handling negative application conditions by left outer join operations. Furthermore, the model manipulation prescribed by the application of a graph transformation rule is also implemented using elementary data manipulation statements (such as insert, delete). As a result, we obtain a robust and fast transformation engine especially suitable for (1) extending modeling tools with an underlying RDBMS repository and (2) embedding model transformations into large distributed applications where models are frequently persisted in a relational database and transaction handling is required to handle large models consistently.

This is a preview of subscription content, access via your institution.


  1. 1.

    Agrawal A., Karsai G., Shi F. Graph transformations on domain-specific models. Technical Report ISIS-03-403, Institute for Software Integrated Systems, Vanderbilt University, November (2003)

  2. 2.

    Andries M., Engels G. A hybrid query language for the extended entity relationship model. J. Vis. Lang. and Computing 8(1) (1997)

  3. 3.

    Aonix: Ameos framework.

  4. 4.

    Balogh A., Varró, G., Varró, D., Pataricza A. Generation of platform-specific model transformation plugins for EJB 3.0. In: Proceedings of the 21st ACM Symposium on Applied Computing, pp. 1288–1295. ACM Press, Dijon, April (2006)

  5. 5.

    Böhlen B. Specific graph models and their mappings to a common model. In: Proc of the 2nd International Workshop on Applications of Graph Transformation with Industrial Relevance (AGTIVE), vol. 3062 of LNCS, pp. 45–60. Springer Berlin Heidelberg New York (2003)

  6. 6.

    Codd E.F. (1970) A relational model for large shared data bank. Commun. ACM 13(6), 377–387

    Google Scholar 

  7. 7.

    Dörr H. (1995) Efficient Graph Rewriting and Its Implementation, vol. 922 of LNCS. Springer, Berlin Heidelberg New York

    Google Scholar 

  8. 8.

    Ehrig H., Engels G., Kreowski H., Rozenberg G. (eds): Handbook on Graph Grammars and Computing by Graph Transformation, vol. 2: Applications Languages and Tools. World Scientific (1999)

  9. 9.

    Ermel C., Rudolf M., Taentzer G. In: [8], chapter The AGG-Approach: Language and Tool Environment, pp. 551–603. World Scientific (1999)

  10. 10.

    Fischer T., Niere J., Torunski L., Zündorf A. Story diagrams: A new graph rewrite language based on the Unified Modeling Language. In: Rozenberg G., Engels G. (eds) Proc. of the 6th International Workshop on Theory and Application of Graph Transformation (TAGT), vol. 1764 of LNCS, pp. 296–309. Springer Berlin Heidelberg New York (1998)

  11. 11.

    Forgy C.L. (1982) RETE: A fast algorithm for the many pattern/many object match problem. Artif. Intell. 19, 17–37

    Article  Google Scholar 

  12. 12.

    Gupta A., Mumick I.S. (eds): Materialized Views: Techniques, Implementations, and Applications. MIT Press (1999)

  13. 13.

    Habel A., Heckel R., Taentzer G. (1996) Graph grammars with negative application conditions. Fundam. Inform. 26(3/4): 287–313

    MathSciNet  MATH  Google Scholar 

  14. 14.

    Jahnke J.H., Schäfer W., Wadsack J.P., Zündorf A. (2002) Supporting iterations in exploratory database reengineering processes. Sci. Comput. Program. 45(2–3): 99–136

    Article  MATH  Google Scholar 

  15. 15.

    Kiesel N., Schürr A., Westfechtel B. GRAS, a graph- oriented database system for (software) engineering applications. In: Reid J.L. (ed), Proc. CASE ’93, 6th Int. Conf. on Computer-Aided Software Engineering, p. 272–286. IEEE Computer Society Press (1993)

  16. 16.

    Larrosa J., Valiente G.(2002) Constraint satisfaction algorithms for graph pattern matching. Mathe. Struct. Comput. Sci. 12(4): 403–422

    Article  MathSciNet  MATH  Google Scholar 

  17. 17.

    Minas M. (2002) Concepts and realization of a diagram editor generator based on hypergraph transformation. Sci. Comput. Program. 44(2): 157–180

    Article  MATH  Google Scholar 

  18. 18.

    Momjian B. PostgreSQL: Introduction and Concepts. Addison-Wesley (2000)

  19. 19.

    Nickel U., Niere J., Zündorf A. The FUJABA environment. In: The 22nd International Conference on Software Engineering (ICSE), pp. 742–745. Limerick, Ireland. ACM Press (2000)

  20. 20.

    Poole J., Chang D. Tolbert D., Mellor D. Common Warehouse Metamodel. Wiley (2002)

  21. 21.

    QVT Partners: Revised submission for MOF 2.0 Query/ Views/Transformations RFP. (2003)

  22. 22.

    Ramakrishnan R., Gehrke J. Database Management Systems. 3rd edn. McGraw-Hill (2002)

  23. 23.

    Rensink A. (2004) The GROOVE simulator: A tool for state space generation. In: Pfalz J., Nagl M., Böhlen B. (eds) Applications of Graph Transformations with Industrial Relevance (AGTIVE), vol. 3062 of Lecture Notes in Computer Science. Springer, Berlin Heidelberg New York, pp. 479–485

    Google Scholar 

  24. 24.

    Rozenberg G. (ed): Handbook of Graph Grammars and Computing by Graph Transformation, vol. 1: Foundations. World Scientific (1997)

  25. 25.

    Schürr A. Specification of graph translators with triple graph grammars. In: Proc. of the 20th Intl. Workshop on Graph-Theoretic Concepts in Computer Science (WG 1994), vol. 903 of LNCS, pp. 151–163. Springer, Berlin Heidelberg New York (1995)

  26. 26.

    Schürr A. In [24], chapter Programmed Graph Replacement Systems, pp. 479–546. World Scientific (1997)

  27. 27.

    Schürr A., Winter A.J., Zündorf A. In [8], chapter The PROGRES Approach: Language and Environment, chap. 13, pp. 487–550. World Scientific (1999)

  28. 28.

    Stephens J., Russell C. Beginning MySQL Database Design and Optimization: From Novice to Professional. Apress (2004)

  29. 29.

    Taentzer G., Rensink A. (2005) Ensuring structural constraints in graph-based models with type inheritance. In: Cerioli M. (ed) Proc. 8th Int. Conf on Fundamental Approaches to Software Engineering (FASE 2005), vol. 3442 of LNCS. Springer, Berlin Heidelberg New York, pp. 64–79

    Google Scholar 

  30. 30.

    Ullman J.D., Widom J., Garcia-Molina H. Database Systems: The Complete Book. Prentice Hall (2001)

  31. 31.

    Vangheluwe H., de~Lara J., Mosterman P.J. An introduction to multi-paradigm modelling and simulation. In: Barros F., Giambiasi N. (eds) Proc. of the AIS’2002 Conference (AI, Simulation and Planning in High Autonomy Systems), pp. 9–20, (2002)

  32. 32.

    Varró D., Varró G., Pataricza A. (2002) Designing the automatic transformation of visual languages. Sci. Comput. Program. 44(2): 205–227

    Article  MATH  Google Scholar 

  33. 33.

    Varró, G., Friedl K., Varró, D.: Graph transformation in relational databases. In: Int. Workshop on Graph-Based Tools (GraBaTs) (2004)

  34. 34.

    Varró, G., Schürr A., Varró, D.: Benchmarking for graph transformation. In: Proc. of the 2005 IEEE Symposium on Visual Languages and Human-Centric Computing, pp. 79–88, Dallas, Texas (2005)

  35. 35.

    Zündorf A. Graph pattern-matching in PROGRES. In: Proc. 5th Int. Workshop on Graph Grammars and their Application to Computer Science, vol. 1073 of LNCS, pp. 454–468. Springer, Berlin Heidelberg New York (1996)

Download references

Author information



Corresponding author

Correspondence to Gergely Varró.

Additional information

The first and the third author were partially supported by the SEGRAVIS Research Training Network. The first and the second author were also partially supported by the grant OTKA T42559. The János Bolyai Scholarship provided additional support for the third author

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Varró, G., Friedl, K. & Varró, D. Implementing a Graph Transformation Engine in Relational Databases. Softw Syst Model 5, 313–341 (2006).

Download citation


  • Tool support
  • Graph transformation
  • Pattern matching
  • Relational databases