Advertisement

Computing

pp 1–26 | Cite as

Schema evolution and foreign keys: a study on usage, heartbeat of change and relationship of foreign keys to table activity

  • Panos VassiliadisEmail author
  • Michail-Romanos Kolozoff
  • Maria Zerva
  • Apostolos V. Zarras
Article
  • 29 Downloads

Abstract

In this paper, we study the evolution of foreign keys in the context of schema evolution for relational databases. Specifically, we study the schema histories of a six free, open-source databases that contain foreign keys. Our findings verify previous results that schemata grow in the long run in terms of tables. To our surprise, we discovered that foreign keys appear to be fairly scarce in the projects that we have studied and they do not necessarily grow in sync with table growth. In fact, we have observed different “cultures” for the handling of foreign keys, ranging from treating foreign keys as an indispensable part of the schema, in full sync with the growth of tables, to the unexpected extreme of treating foreign keys as an optional add-on that twice resulted in their full removal from the schema of the database. Apart from the behavior of entire schemata, we have also studied the behavior of individual tables. We model the schema of any version of the history as a graph, with tables being nodes and foreign keys being edges. The union of these graphs is called the diachronic graph of the schema and contains all the tables and foreign keys that ever appeared in the schema history. The study of the total degree of tables at the diachronic graph, reveals several patterns. The population of tables with total degree in the range of [0–2] includes almost all the tables that were eventually removed from the schema, as well as the vast majority of survivor tables. These low-degree tables (especially the dead ones) tend to be mostly with zero or very few internal updates in their entire history. At the same time, the few tables with degree higher than 2 are typically born very early in the life of the schema, overwhelmingly survivors, and, unusually active, typically undergoing medium or high update activity.

Keywords

Schema evolution Foreign keys Databases 

Notes

Acknowledgements

We thank the reviewers of both the current and previous papers for their comments that helped us clarify better key points of interest.

Supplementary material

607_2019_702_MOESM1_ESM.pdf (1.2 mb)
Supplementary material 1 (pdf 1243 KB)

References

  1. 1.
    Boslaugh S (2012) Statistics in a nutshell—a desktop quick reference. O’Reilly, SebastopolGoogle Scholar
  2. 2.
    Cleve A, Brogneaux A, Hainaut J (2010) A conceptual approach to database applications evolution. In: 29th International conference on conceptual modeling (ER 2010), Vancouver, BC, Canada, November 1–4, 2010, pp 132–145Google Scholar
  3. 3.
    Cleve A, Gobert M, Meurice L, Maes J, Weber JH (2015) Understanding database schema evolution: a case study. Sci Comput Program 97:113–121CrossRefGoogle Scholar
  4. 4.
    Curino C, Moon HJ, Tanca L, Zaniolo C (2008) Schema evolution in wikipedia: toward a web information system benchmark. In: Proceedings of ICEIS 2008, CiteseerGoogle Scholar
  5. 5.
    Curino C, Moon HJ, Deutsch A, Zaniolo C (2013) Automating the database schema evolution process. VLDB J 22(1):73–98CrossRefGoogle Scholar
  6. 6.
    Decan A, Goeminne M, Mens T (2015) On the interaction of relational database access technologies in open source java projects. In: Post-proceedings of the 8th seminar on advanced techniques and tools for software evolution, Mons, Belgium, July 6–8, 2015, pp 26–35Google Scholar
  7. 7.
    Decan A, Goeminne M, Mens T (2017) On the interaction of relational database access technologies in open source java projects. CoRR abs/1701.00416. arXiv:1701.00416
  8. 8.
    García-García J, Ordonez C (2010) Extended aggregations for databases with referential integrity issues. Data Knowl Eng 69(1):73–95CrossRefGoogle Scholar
  9. 9.
    Herrmann K, Voigt H, Behrend A, Lehner W (2015) Codel: a relationally complete language for database evolution. In: 19th East European conference on advances in databases and information systems (ADBIS 2015), Poitiers, France, September 8–11, 2015, pp 63–76Google Scholar
  10. 10.
    Kagdi HH, Collard ML, Maletic JI (2007) A survey and taxonomy of approaches for mining software repositories in the context of software evolution. J Softw Maint 19(2):77–131CrossRefGoogle Scholar
  11. 11.
    Köhler H, Link S (2018) SQL schema design: foundations, normal forms, and normalization. Inf Syst 76:88–113CrossRefGoogle Scholar
  12. 12.
    Lin DY, Neamtiu I (2009) Collateral evolution of applications and databases. In: Proceedings of the joint international and annual ERCIM workshops on principles of software evolution (IWPSE) and software evolution (Evol) workshops, IWPSE-Evol ’09, pp 31–40Google Scholar
  13. 13.
    Manousis P, Vassiliadis P, Papastefanatos G (2013) Automating the adaptation of evolving data-intensive ecosystems. In: Proceedings of 32th international conference on conceptual modeling (ER 2013), Hong-Kong, China, November 11–13, 2013, pp 182–196Google Scholar
  14. 14.
    Meurice L, Ruiz FJB, Weber JH, Cleve A (2014) Establishing referential integrity in legacy information systems—reality bites! In: 30th IEEE international conference on software maintenance and evolution, Victoria, BC, Canada, September 29–October 3, 2014, pp 461–465Google Scholar
  15. 15.
    Meurice L, Nagy C, Cleve A (2016) Static analysis of dynamic database usage in java systems. In: Proceedings of 28th international conference on advanced information systems engineering , CAiSE 2016, Ljubljana, Slovenia, June 13–17, 2016, pp 491–506Google Scholar
  16. 16.
    Papenbrock T, Ehrlich J, Marten J, Neubert T, Rudolph J, Schönberg M, Zwiener J, Naumann F (2015) Functional dependency discovery: an experimental evaluation of seven algorithms. PVLDB 8(10):1082–1093Google Scholar
  17. 17.
    Qiu D, Li B, Su Z (2013) An empirical analysis of the co-evolution of schema and code in database applications. In: Proceedings of the 2013 9th joint meeting on foundations of software engineering, ESEC/FSE 2013, pp 125–135Google Scholar
  18. 18.
    Sjøberg D (1993) Quantifying schema evolution. Inf Softw Technol 35(1):35–44CrossRefGoogle Scholar
  19. 19.
    Skoulis I, Vassiliadis P, Zarras A (2014) Open-source databases: within, outside, or beyond Lehman’s laws of software evolution? In: 26th International conference on advanced information systems engineering (CAiSE 2014), Thessaloniki, Greece, June 16–20, 2014Google Scholar
  20. 20.
    Skoulis I, Vassiliadis P, Zarras AV (2015) Growing up with stability: How open-source relational databases evolve. Inf Syst 53:363–385CrossRefGoogle Scholar
  21. 21.
    Teorey TJ, Yang D, Fry JP (1986) A logical design methodology for relational databases using the extended entity-relationship model. ACM Comput Surv 18(2):197–222CrossRefzbMATHGoogle Scholar
  22. 22.
    Vassiliadis P (2017) Schema evolution and gravitation to rigidity: a tale of calmness in the lives of structured data. In: Proceedings of 7th international conference model and data engineering—MEDI 2017, Barcelona, Spain, October 4–6, 2017, pp 18–23Google Scholar
  23. 23.
    Vassiliadis P, Zarras AV (2017) Survival in schema evolution: putting the lives of survivor and dead tables in counterpoint. In: 29th International conference on advanced information systems engineering (CAiSE 2017), Essen, Germany, June 12–16, 2017, pp 333–347Google Scholar
  24. 24.
    Vassiliadis P, Zarras AV, Skoulis I (2015) How is life for a table in an evolving relational schema? Birth, death and everything in between. In: Proceedings of 34th international conference on conceptual modeling (ER 2015), Stockholm, Sweden, October 19–22, 2015, pp 453–466Google Scholar
  25. 25.
    Vassiliadis P, Kolozoff M, Zerva M, Zarras AV (2017a) Schema evolution and foreign keys: birth, eviction, change and absence. In: Proceedings of 36th international conference on conceptual modeling (ER 2017), Valencia, Spain, November 6–9, 2017, pp 106–119Google Scholar
  26. 26.
    Vassiliadis P, Zarras AV, Skoulis I (2017b) Gravitating to rigidity: patterns of schema evolution—and its absence—in the lives of tables. Inf Syst 63:24–46CrossRefGoogle Scholar
  27. 27.
    Wu S, Neamtiu I (2011) Schema evolution analysis for embedded databases. In: Proceedings of the 2011 IEEE 27th international conference on data engineering workshops, ICDEW ’11, pp 151–156Google Scholar
  28. 28.
    Zhang M, Hadjieleftheriou M, Ooi BC, Procopiuc CM, Srivastava D (2010) On multi-column foreign key discovery. PVLDB 3(1):805–814Google Scholar

Copyright information

© Springer-Verlag GmbH Austria, part of Springer Nature 2019

Authors and Affiliations

  1. 1.Department of Computer Science and EngineeringUniversity of IoanninaIoanninaGreece
  2. 2.Advantage FSEAthensGreece
  3. 3.P&I AGIoanninaGreece

Personalised recommendations