Nested relations and recursive queries

  • Volker Linnemann
Part III Database Modeling
Part of the Lecture Notes in Computer Science book series (LNCS, volume 361)


Recently, several researchers realized that the modelling capabilities of traditional relational data base systems are rather limited for advanced applications. Among others, two main research areas can be identified: One area of research is concerned with removing the limitation of flat tuples by supporting structured objects instead. Another area of research deals with the limitation of traditional query languages. Already in the late seventies it was proven that so called relationally complete query languages do not allow to express the computation of the transitive closure of a relation. Most researchers solve the problem by introducing some kind of recursion. The work presented in this paper is an attempt to combine both areas of research. It proposes the integration of recursive queries and nested relations by providing a recursion mechanism which can be nested according to the structure of a non first normal form relation. It is shown by examples that this method can be used to formulate queries which are rather cumbersome if only flat relations are used. Especially, in some cases the problem of performing a selection on a recursively defined relation disappears. This question has been the topic of several research papers recently. Moreover, many queries can be formulated in a more natural way than in the world of flat tuples. Therefore, nested recursive queries in combination with non first normal form relations provide a contribution to the problem of modelling complex data.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. AB84.
    S.Abiteboul, N.Bidoit: Non First Normal Form Relations: An Algebra Allowing Data Restructuring. Rapports de Recherche No 347, Institut de Recherche en Informatique et en Automatique, Rocquencourt, France, Nov. 1984.Google Scholar
  2. Ag87.
    R.Agrawal: An Extension of Relational Algebra To Express a Class of Recursive Queries, Proc. Third IEEE Conference on Data Engineering, Los Angeles, 1987, 580–590Google Scholar
  3. AhU179.
    A.V. Aho, J.D. Ullman: Universality of Data Retrieval Languages, 6th ACM Symp. on Principles of Programming Languages, San Antonio, Texas, January 1979, 110–117Google Scholar
  4. Ap85.
    Appelrath,H.J.: Von Datenbanken zu Expertensystemen, Informatik-Fachberichte 102, Springer-Verlag 1985Google Scholar
  5. Ba85.
    R. Bayer: Database Technology for Expert Systems, Informatik Fachberichte 112, Springer Verlag 1985, 1–16Google Scholar
  6. Ban85.
    F. Bancilhon: Naive Evaluation of Recursively Defined Relations, MCC Technical Report DB-004-85Google Scholar
  7. BaRa86.
    F. Bancilhon, R.Ramakrishnan: An Amateur's Introduction to Recursive Query Processing Strategies, Proc. ACM SIGMOD Conf., Washington,D.C., 1986, 16–52Google Scholar
  8. CAE76.
    D.D. Chamberlin et al.: SEQUEL2: A Unified Approach to Data Definition, Manipulation and Control, IBM Journ. Res. Devel. 20 (1976), 560–575.Google Scholar
  9. C1Me81.
    W.F. Clocksin, C.S. Mellish: Programming in PROLOG, Springer Verlag 1981Google Scholar
  10. Co72.
    E.F.Codd: Relational Completeness of Database Sublanguages. In Database Systems, ed. R. Rustin, Courant Comp. Sc. Symposia Ser. Vol. 6, Englewood Cliffs, N.Y. Prentice Hall, 1972.Google Scholar
  11. CMW87.
    I.F. Cruz, A.O. Mendelzon, P.T. Wood: A Graphical Query Language Supporting Recursion, Proc. ACM SIGMOD Conf., San Francisco, 1987, 323–330Google Scholar
  12. DaKü86.
    P.Dadam, K.Küspert, F.Andersen, H.Blanken, R.Erbe, J.Günauer, V.Lum, P.Pistor, G.Walch: A DBMS Prototype to Support Extended NF 2 Relations: An Integrated View on Flat Tables and Hierarchies, Proc. ACM SIGMOD Conf., Washington,D.C., 1986, 356–367Google Scholar
  13. GaMa86.
    G. Gardarin, Ch. de Maindreville: Evaluation of Database Recursive Logic Programs as Recurrent Function Series, Proc. ACM SIGMOD Conf., Washington,D.C., 1986, 177–186Google Scholar
  14. GMN84.
    H. Gallaire, J. Minker, J.M. Nicolas: Logic and Databases: A Deductive Approach, Comp. Surveys, Vol.16, No.2, June 1984, 153–185Google Scholar
  15. GKB87.
    U.Güntzer, W.Kiessling, R.Bayer: On the Evaluation of Recursion in (Deductive) Database Systems by Efficient Differential Fixpoint Computation, Proc. Third IEEE International Conference on Data Engineering, Los Angeles, 1987, 120–129Google Scholar
  16. HL82.
    R.L.Haskin, R.A.Lorie: On Extending the Functions of a Relational Database System. Proc. SIGMOD 82, Orlando, June 1982, 207–212.Google Scholar
  17. HeNa84.
    L.J. Henschen, S.A. Naqvi: On Compiling Queries in Recursive First-Order Databases, JACM Vol.31, No.1, January 1984, 47–85Google Scholar
  18. IBM81.
    SQL/Data System, Concepts and Facilities, IBM Corporation, GH 24-5013, Jan. 1981.Google Scholar
  19. ISW84.
    Y. Ioannides, L.L. Shinkle, E. Wong: Enhancing INGRES with Deductive Power, in /Ke84/, 847–850Google Scholar
  20. JaCIVa84.
    M.Jarke, J.Clifford, Y.Vassiliou: An Optimizing PROLOG Front-End to a Relational Query System, Proc. ACM SIGMOD Conference, Boston 1984, 296–306Google Scholar
  21. JaLiSc85.
    M.Jarke, V.Linnemann, J.W.Schmidt: Data Constructors: On the Integration of Rules and Relations, Proc. 11th Intern. Conf. on Very Large Data Bases, Stockholm, August 1985, 227–240Google Scholar
  22. Ke84.
    L. Kerschberg (ed.): Proc. of the First International Workshop on Expert Database Systems, Kiawah Island, South Carolina, October 1984Google Scholar
  23. Ko81.
    R.Kowalski: Logic as a Database Language, Department of Computing, Imperial College, London, 1981Google Scholar
  24. La84.
    W.Lamersdorf: Recursive Data Models for Non-Conventional Database Applications, Proc. First Intern. IEEE Conference on Data Engineering, Los Angeles, 1984Google Scholar
  25. LaMSc84.
    W.Lamersdorf, G.Müller, J.W.Schmidt: Language Support for Office Modelling. VLDB Proc., Singapore, 1984, 280–288.Google Scholar
  26. Li86.
    V.Linnemann: Constructorset's Database Support for Knowledge Based Systems, Proc. Second IEEE International Conference on Data Engineering, Los Angeles, 1986, 244–251Google Scholar
  27. Li87a.
    V.Linnemann: Non First Normal Form Relations and Recursive Queries: An SQL-Based Approach, Proc. Third IEEE International Conference on Data Engineering, Los Angeles, 1987, 591–598Google Scholar
  28. Li87b.
    V.Linnemann: Optimization of Recursive Queries Over Nested Relations by a Differential Technique, Technical Report IBM Scientific Center Heidelberg TR87.07.005, July 1987Google Scholar
  29. PA86.
    P.Pistor, F.Andersen: Principles for Designing a Generalized NF 2 Data Model with an SQL-type Language Interface, 12th Intern. Conf. on Very Large Data Bases, Kyoto, Japan, Aug. 1986, 278–285Google Scholar
  30. Pi87.
    P.Pistor: The Advanced Information Management Prototype: Architecture and Language Interface Overview, 3. Journee Base Donnees Avancees, Port Camargue, France, May 1987Google Scholar
  31. PiDa88.
    P. Pistor, P. Dadam: The Advanced Information Management Prototype, in these proceedings.Google Scholar
  32. PT85.
    P.Pistor, R.Traunmüller: A Database Language for Sets, Lists, and Tables. IBM Wiss. Zentr. Heidelberg Techn. Rep. TR 85.10.004, Oct. 1985.Google Scholar
  33. RKB85.
    M.A. Roth, H.F.Korth, D.S.Batory: SQL/NF: A Query Language for — 1NF Relational Databases. Deptm. Comp. Scienc. Univ. of Texas, Austin, TR-85-19, Sept. 1985.Google Scholar
  34. RHDM86.
    A.Rosenthal, S.Heiler, U.Dayal, F.Manola: Traversal Recursion: A Practical Approach to Supporting Recursive Applications, Proc. ACM SIGMOD Conf., Washington,D.C., 1986, 166–176Google Scholar
  35. SP82.
    H.-J.Schek, P.Pistor: Data Structures for an Integrated Data Base Management and Information Retrieval System, Proc. VLDB Conf. Mexico, Sept. 1982, 197–207Google Scholar
  36. SS86.
    H.-J. Schek, M. Scholl: The Relational Model with Relation-Valued Attributes, Information Systems 1986, Vol.11, No.2, pp. 137–147Google Scholar
  37. St86.
    Stonebraker,M.: Inclusion of New Types in Relational Data Base Systems, Proc. Second Intern. Conference on Data Engineering, Los Angeles, Feb. 1986, 262–269Google Scholar
  38. Ta55.
    A. Tarski: A Lattice Theoretical Fixpoint Theorem and its Applications, Pacific Journal of Mathematics 5:2, June 1955, 285–309Google Scholar
  39. Ul85.
    J.D. Ullman: Implementation of Logical Query Languages for Databases, ACM TODS 10(3), Sept. 1985, 289–321Google Scholar
  40. Vi85.
    L.Vieille: Recursive Axioms in Deductive Databases: The Query-Subquery Approach, European Computer-Industry Research Centre GmbH (ECRC) Internal Report KB-10, Sept. 1985Google Scholar
  41. Wo88.
    M.Woschko: Implementierung Rekursiver Anfragen in einem Datenbanksystem, Diplomarbeit Fachhochschule für Technik Mannheim 1988Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1989

Authors and Affiliations

  • Volker Linnemann
    • 1
  1. 1.IBM Scientific Center HeidelbergHeidelbergWest Germany

Personalised recommendations