skip to main content
10.1145/3034786.3056106acmconferencesArticle/Chapter ViewAbstractPublication PagespodsConference Proceedingsconference-collections
research-article

J-Logic: Logical Foundations for JSON Querying

Published:09 May 2017Publication History

ABSTRACT

We propose a logical framework, based on Datalog, to study the foundations of querying JSON data. The main feature of our approach, which we call J-Logic, is the emphasis on paths. Paths are sequences of keys and are used to access the tree structure of nested JSON objects. J-Logic also features "packing" as a means to generate a new key from a path or subpath. J-Logic with recursion is computationally complete, but many queries can be expressed without recursion, such as deep equality. We give a necessary condition for queries to be expressible without recursion. Most of our results focus on the deterministic nature of JSON objects as partial functions from keys to values. Predicates defined by J-Logic programs may not properly describe objects, however. Nevertheless we show that every object-to-object transformation in J-Logic can be defined using only objects in intermediate results. Moreover we show that it is decidable whether a positive, nonrecursive J-Logic program always returns an object when given objects as inputs. Regarding packing, we show that packing is unnecessary if the output does not require new keys. Finally, we show the decidability of query containment for positive, nonrecursive J-Logic programs.

References

  1. S. Abiteboul and R. Hull. Data functions, datalog and negation. In H. Boral and P.A. Larson, editors, 1988 Proceedings SIGMOD International Conference on Management of Data, pages 143--153. ACM Press, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. Abiteboul, R. Hull, and V. Vianu. Foundations of Databases. Addison-Wesley, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. Abiteboul and P.C. Kanellakis. Object identity as a query language primitive. Journal of the ACM, 45(5):798--842, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Abiteboul and V. Vianu. Procedural languages for database queries and updates. Journal of Computer and System Sciences, 41(2):181--229, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Abiteboul and V. Vianu. Datalog extensions for database queries and updates. Journal of Computer and System Sciences, 43(1):62--124, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P.C. Arocena, B. Glavic, and R.J. Miller. Value invention in data exchange. In Proceedings 2013 SIGMOD Conference, pages 157--168. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Barceló and R. Pichler, editors. Datalog in Academia and Industry: Second International Workshop, Datalog 2.0, volume 7494 of Lecture Notes in Computer Science. Springer, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. Beeri and M.Y. Vardi. A proof procedure for data dependencies. Journal of the ACM, 31(4):718--741, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Bonner and G. Mecca. Sequences, Datalog, and transducers. Journal of Computer and System Sciences, 57:234--259, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A.J. Bonner and G. Mecca. Querying sequence databases with transducers. Acta Informatica, 36:511--544, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Buneman, A. Deutsch, and W.-C. Tan. A deterministic model for semi-structured data. http://users.soe.ucsc.edu/ tan/papers/1998/icdt.pdf. Presented at the Workshop on Query Processing for Semistructured Data and Non-standard Data Formats, Jerusalem, Israel, January 13, 1999.Google ScholarGoogle Scholar
  12. P. Buneman, S.A. Naqvi, V. Tannen, and L. Wong. Principles of programming with complex objects and collection types. Theoretical Computer Science, 149(1):3--48, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. L. Cabibbo. The expressive power of stratified logic programs with value invention. Information and Computation, 147(1):22--56, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. A.K. Chandra and D. Harel. Computable queries for relational data bases. Journal of Computer and System Sciences, 21(2):156--178, 1980.Google ScholarGoogle ScholarCross RefCross Ref
  15. O. de Moor, G. Gottlob, T. Furche, and A. Sellers, editors. Datalog Reloaded: First International Workshop, Datalog 2010, volume 6702 of Lecture Notes in Computer Science. Springer, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. The JSON data interchange format. Standard ECMA-404, October 2013.Google ScholarGoogle Scholar
  17. D. Florescu and G. Fourny. JSONiq: The history of a query language. IEEE Internet Computing, 17(5):86--90, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. G. Fourny. JSONiq, the SQL of NoSQL. http://www.28.io/jsoniq-the-sql-of-nosql. Retrieved 25 November 2016.Google ScholarGoogle Scholar
  19. D.D. Freydenberger and D. Reidenbach. Bad news on decision problems for patterns. Information and Computation, 208(1):83--96, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. T. Furche, G. Gottlob, B. Neumayr, and E. Sallinger. Data wrangling for big data: Towards a lingua franca for data wrangling. In R. Pichler and A. Soares da Silva, editors, Proceedings 10th Alberto Mendelzon International Workshop on Foundations of Data Management, volume 1644 of CEUR Workshop Proceedings, 2016.Google ScholarGoogle Scholar
  21. H. Garcia-Molina, Y. Papakonstantinou, D. Quass, A. Rajaraman, Y. Sagiv, J. Ullman, V. Vassalos, and J. Widom. The TSIMMIS approach to mediation: data models and languages. Journal of Intelligent Information Systems, 8(2):117--132, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Gyssens, J. Paredaens, J. Van den Bussche, and D. Van Gucht. A graph-oriented object database model. IEEE Transactions on Knowledge and Data Engineering, 6(4):572--586, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. S.S. Huang, T.J. Green, and B.T. Loo. Datalog and emerging applications: an interactive tutorial. In Proceedings 2011 ACM SIGMOD International Conference on Management of Data, pages 1213--1216. ACM Press, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. Hull and M. Yoshikawa. ILOG: Declarative creation and manipulation of object identifiers. In D. McLeod, R. Sacks-Davis, and H. Schek, editors, Proceedings of the 16th International Conference on Very Large Data Bases, pages 455--468. Morgan Kaufmann, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Kifer and J. Wu. A logic for programming with complex objects. Journal of Computer and System Sciences, 47(1):77--120, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. A. Klug and R. Price. Determining view dependencies using tableaux. ACM Transactions on Database Systems, 7:361--380, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. G. Kuper and M. Vardi. The logical data model. ACM Transactions on Database Systems, 18(3):379--413, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. G. Mecca and A.J. Bonner. Query languages for sequence databases: Termination and complexity. IEEE Transactions on Knowledge and Data Engineering, 13(3):519--525, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. K.W. Ong, Y. Papakonstantinou, and R. Vernoux. The SQLGoogle ScholarGoogle Scholar
  30. query language: Configurable, unifying and semi-structured. arXiv:1405.3631, 2015.Google ScholarGoogle Scholar
  31. J. Paredaens and D. Van Gucht. Converting nested algebra expressions into flat algebra expressions. ACM Transactions on Database Systems, 17(1):65--93, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. F. Pezoa, J.L. Reutter, F. Suarez, M. Ugarte, and D. Vrgo\vc. Foundations of JSON Schema. In Proceedings 25th International Conference on World Wide Web, pages 263--273, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. A. Poggi et al. Linking data to ontologies. Journal on Data Semantics, 10:133--173, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. K. Tajima. Schemaless semistructured data revisited: Reinventing Peter Buneman's deterministic semistructured data model. In V. Tannen, L. Wong, et al., editors, In Search of Elegance in the Theory and Practice of Computation, volume 8000 of Lecture Notes in Computer Science, pages 466--482. Springer, 2013.Google ScholarGoogle Scholar
  35. J. Van den Bussche and J. Paredaens. The expressive power of complex values in object-based data models. Information and Computation, 120:220--236, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. J. Van den Bussche, D. Van Gucht, M. Andries, and M. Gyssens. On the completeness of object-creating database transformation languages. Journal of the ACM, 44(2):272--319, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. T.L. Veldhuizen. Leapfrog triejoin: A simple, worst-case optimal join algorithm. In Proceedings 17th International Conference on Database Theory, pages 96--106, 2014.Google ScholarGoogle Scholar

Index Terms

  1. J-Logic: Logical Foundations for JSON Querying

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      PODS '17: Proceedings of the 36th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems
      May 2017
      458 pages
      ISBN:9781450341981
      DOI:10.1145/3034786

      Copyright © 2017 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 9 May 2017

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      PODS '17 Paper Acceptance Rate29of101submissions,29%Overall Acceptance Rate642of2,707submissions,24%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader