Abstract
Database schema elements such as tables, views, triggers and functions are typically defined with many interrelations. In order to support database users in understanding a given schema, a rule-based approach for analyzing the respective dependencies is proposed using Datalog expressions. We show that many interesting properties of schema elements can be systematically determined this way. The expressiveness of the proposed analysis is exemplarily shown with the problem of computing induced functional dependencies for derived relations. The propagation of functional dependencies plays an important role in data integration and query optimization but represents an undecidable problem in general. And yet, our rule-based analysis covers all relational operators as well as linear recursive expressions in a systematic way showing the depth of analysis possible by our proposal. The analysis of functional dependencies is well-integrated in a uniform approach to analyzing dependencies between schema elements in general.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Aho, A.V., Beeri, C., Ullman, J.D.: The theory of joins in relational databases. TODS 4(3), 297–314 (1979)
Armstrong, W.W.: Dependency structures of data base relationships. In: IFIP Congress 1974, pp. 580–583 (1974)
Behrend, A., Manthey, R.: A transformation-based approach to view updating in stratifiable deductive databases. In: Hartmann, S., Kern-Isberner, G. (eds.) FoIKS 2008. LNCS, vol. 4932, pp. 253–271. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-77684-0_18
Boehm, A.M., Seipel, D., Sickmann, A., Wetzka, M.: Squash: a tool for analyzing, tuning and refactoring relational database applications. In: Seipel, D., Hanus, M., Wolf, A. (eds.) INAP/WLP 2007. LNCS (LNAI), vol. 5437, pp. 82–98. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-00675-3_6
Brass, S., Goldberg, C.: Proving the safety of SQL queries. In: QSIC 2005, pp. 197–204 (2005)
Brass, S.: Language constructs for a datalog compiler. In: Benslimane, D., Damiani, E., Grosky, W.I., Hameurlain, A., Sheth, A., Wagner, R.R. (eds.) DEXA 2017. LNCS, vol. 10438, pp. 130–140. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-64468-4_10
Brisaboa, N.R., González, A., Hernández, H.J., Paramá, J.R.: The chase of datalog programs. In: Embury, S.M., Fiddian, N.J., Gray, W.A., Jones, A.C. (eds.) BNCOD 1998. LNCS, vol. 1405, pp. 165–166. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0053479
Calì, A., Calvanese, D., De Giacomo, G., Lenzerini, M.: Data integration under integrity constraints. Inf. Syst. 29(2), 147–163 (2004)
Davidson, S.B., Fan, W., Hara, C.S., Qin, J.: Propagating XML constraints to relations. In: ICDE 2003, pp. 543–554 (2003)
Delobel, C., Adiba, M.: Relational Database Systems. Elsevier, New York (1985)
Fagin, R., Kolaitis, P.G., Popa, L., Tan, W.C.: Reverse data exchange: coping with nulls. In: PODS 2009, pp. 23–32 (2009)
Fan, W., Ma, S., Hu, Y., Liu, J., Wu, Y.: Propagating functional dependencies with conditions. PVLDB 1(1), 391–407 (2008)
Herrmann, K., Voigt, H., Behrend, A., Rausch, J., Lehner, W.: Living in parallel realities - co-existing schema versions with a bidirectional database evolution language. In: SIGMOD 2017, pp. 1101–1116 (2017)
Hill, P.M., Lloyd, J.W.: Analysis of meta-programs. In: Meta-Programming in Logic Programming, pp. 23–51 (1989)
Klug, A.C.: Calculating constraints on relational expressions. TODS 5(3), 260–290 (1980)
Klug, A.C., Price, R.: Determining view dependencies using tableaux. TODS 7(3), 361–380 (1982)
Maier, D., Mendelzon, A.O., Sagiv, Y.: Testing implications of data dependencies. TODS 4(4), 455–469 (1979)
Maule, A., Emmerich, W., Rosenblum, D.S.: Impact analysis of database schema changes. In: ICSE 2008, pp. 451–460 (2008)
Milo, T., Zohar, S.: Using schema matching to simplify heterogeneous data translation. In: VLDB 1998, pp. 122–133 (1998)
Paramá, J.R., Brisaboa, N.R., Penabad, M.R., Places, Á.S.: A semantic query optimization approach to optimize linear datalog programs. In: Manolopoulos, Y., Návrat, P. (eds.) ADBIS 2002. LNCS, vol. 2435, pp. 277–290. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45710-0_22
Paramá, J.R., Brisaboa, N.R., Penabad, M.R., Places, Á.S.: Implication of functional dependencies for recursive queries. In: Broy, M., Zamulin, A.V. (eds.) PSI 2003. LNCS, vol. 2890, pp. 509–519. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-39866-0_49
Wang, K., Yuan, L.: Preservation of integrity constraints in definite DATALOG programs. Inf. Process. Lett. 44(4), 185–193 (1992)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this paper
Cite this paper
Engels, C., Behrend, A., Brass, S. (2018). A Rule-Based Approach to Analyzing Database Schema Objects with Datalog. In: Fioravanti, F., Gallagher, J. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2017. Lecture Notes in Computer Science(), vol 10855. Springer, Cham. https://doi.org/10.1007/978-3-319-94460-9_2
Download citation
DOI: https://doi.org/10.1007/978-3-319-94460-9_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-94459-3
Online ISBN: 978-3-319-94460-9
eBook Packages: Computer ScienceComputer Science (R0)