Software & Systems Modeling

, Volume 5, Issue 3, pp 313–341 | Cite as

Implementing a Graph Transformation Engine in Relational Databases

  • Gergely Varró
  • Katalin Friedl
  • Dániel Varró
Special Section Paper


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.


Tool support Graph transformation Pattern matching Relational databases 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  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)Google Scholar
  2. 2.
    Andries M., Engels G. A hybrid query language for the extended entity relationship model. J. Vis. Lang. and Computing 8(1) (1997)Google Scholar
  3. 3.
    Aonix: Ameos framework. Scholar
  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)Google Scholar
  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)Google Scholar
  6. 6.
    Codd E.F. (1970) A relational model for large shared data bank. Commun. ACM 13(6), 377–387Google Scholar
  7. 7.
    Dörr H. (1995) Efficient Graph Rewriting and Its Implementation, vol. 922 of LNCS. Springer, Berlin Heidelberg New YorkGoogle 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)Google Scholar
  9. 9.
    Ermel C., Rudolf M., Taentzer G. In: [8], chapter The AGG-Approach: Language and Tool Environment, pp. 551–603. World Scientific (1999)Google Scholar
  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)Google Scholar
  11. 11.
    Forgy C.L. (1982) RETE: A fast algorithm for the many pattern/many object match problem. Artif. Intell. 19, 17–37CrossRefGoogle Scholar
  12. 12.
    Gupta A., Mumick I.S. (eds): Materialized Views: Techniques, Implementations, and Applications. MIT Press (1999)Google Scholar
  13. 13.
    Habel A., Heckel R., Taentzer G. (1996) Graph grammars with negative application conditions. Fundam. Inform. 26(3/4): 287–313MathSciNetzbMATHGoogle 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–136CrossRefzbMATHGoogle 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)Google Scholar
  16. 16.
    Larrosa J., Valiente G.(2002) Constraint satisfaction algorithms for graph pattern matching. Mathe. Struct. Comput. Sci. 12(4): 403–422CrossRefMathSciNetzbMATHGoogle Scholar
  17. 17.
    Minas M. (2002) Concepts and realization of a diagram editor generator based on hypergraph transformation. Sci. Comput. Program. 44(2): 157–180CrossRefzbMATHGoogle Scholar
  18. 18.
    Momjian B. PostgreSQL: Introduction and Concepts. Addison-Wesley (2000)Google Scholar
  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)Google Scholar
  20. 20.
    Poole J., Chang D. Tolbert D., Mellor D. Common Warehouse Metamodel. Wiley (2002)Google Scholar
  21. 21.
    QVT Partners: Revised submission for MOF 2.0 Query/ Views/Transformations RFP. (2003)Google Scholar
  22. 22.
    Ramakrishnan R., Gehrke J. Database Management Systems. 3rd edn. McGraw-Hill (2002)Google Scholar
  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–485Google Scholar
  24. 24.
    Rozenberg G. (ed): Handbook of Graph Grammars and Computing by Graph Transformation, vol. 1: Foundations. World Scientific (1997)Google Scholar
  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)Google Scholar
  26. 26.
    Schürr A. In [24], chapter Programmed Graph Replacement Systems, pp. 479–546. World Scientific (1997)Google Scholar
  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)Google Scholar
  28. 28.
    Stephens J., Russell C. Beginning MySQL Database Design and Optimization: From Novice to Professional. Apress (2004)Google Scholar
  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–79Google Scholar
  30. 30.
    Ullman J.D., Widom J., Garcia-Molina H. Database Systems: The Complete Book. Prentice Hall (2001)Google Scholar
  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)Google Scholar
  32. 32.
    Varró D., Varró G., Pataricza A. (2002) Designing the automatic transformation of visual languages. Sci. Comput. Program. 44(2): 205–227CrossRefzbMATHGoogle Scholar
  33. 33.
    Varró, G., Friedl K., Varró, D.: Graph transformation in relational databases. In: Int. Workshop on Graph-Based Tools (GraBaTs) (2004)Google Scholar
  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)Google Scholar
  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)Google Scholar

Copyright information

© Springer-Verlag 2006

Authors and Affiliations

  • Gergely Varró
    • 1
  • Katalin Friedl
    • 1
  • Dániel Varró
    • 2
  1. 1.Department of Computer Science and Information TheoryBudapest University of Technology and EconomicsBudapestHungary
  2. 2.Department of Measurement and Information SystemsBudapest University of Technology and EconomicsBudapestHungary

Personalised recommendations