A Comprehensive Tutorial on over 100 Years of Diagrammatic Representations of Logical Statements and Relational Queries (2404.00007v1)
Abstract: Query formulation is increasingly performed by systems that need to guess a user's intent (e.g. via spoken word interfaces). But how can a user know that the computational agent is returning answers to the "right" query? More generally, given that relational queries can become pretty complicated, how can we help users understand relational queries, whether human-generated or automatically generated? Now seems the right moment to revisit a topic that predates the birth of the relational model: developing visual metaphors that help users understand relational queries. This lecture-style tutorial surveys the key visual metaphors developed for diagrammatic representations of logical statements and relational expressions, across both the relational database and the much older diagrammatic reasoning communities. We survey the history and state-of-the-art of relationally-complete diagrammatic representations of relational queries, discuss the key visual metaphors developed in over a century of investigations into diagrammatic languages, and organize the landscape by mapping the visual alphabets of diagrammatic representation systems to the syntax and semantics of Relational Algebra (RA) and Relational Calculus (RC). Tutorial website: https://northeastern-datalab.github.io/diagrammatic-representation-tutorial/
- A. Abouzied, J. M. Hellerstein, and A. Silberschatz, “Dataplay: interactive tweaking and example-driven correction of graphical database queries,” in UIST, 2012, pp. 207–218, https://doi.org/10.1145/2380116.2380144.
- M. Angelaccio, T. Catarci, and G. Santucci, “QBD*: A graphical query language with recursion,” IEEE Transactions on Software Engineering (TSE), vol. 16, no. 10, pp. 1150–1163, 1990, https://doi.org/10.1109/32.60295.
- ——, “Query by diagram: A fully visual query system,” Elsevier Journal of Visual Languages & Computing, vol. 1, no. 3, pp. 255–273, 1990, https://doi.org/10.1016/S1045-926X(05)80009-6.
- E. Bakke and D. R. Karger, “Expressive query construction through direct manipulation of nested relational results,” in SIGMOD, 2016, pp. 1377–1392, https://doi.org/10.1145/2882903.2915210.
- S. D. Bartolomeo, M. Riedewald, W. Gatterbauer, and C. Dunne, “STRATISFIMAL LAYOUT: A modular optimization model for laying out layered node-link network visualizations,” IEEE Transactions on Visualization and Computer Graphics (TVCG), vol. 28, no. 1, pp. 324–334, 2022, https://doi.org/10.1109/TVCG.2021.3114756, Full version: https://osf.io/qdyt9.
- S. S. Bhowmick and B. Choi, “Data-driven visual query interfaces for graphs: Past, present, and (near) future,” in SIGMOD, 2022, pp. 2441–2447, https://doi.org/10.1145/3514221.3522562.
- S. S. Bhowmick, B. Choi, and C. Li, “Graph querying meets HCI: state of the art and future directions,” in SIGMOD, 2017, pp. 1731–1736, https://doi.org/10.1145/3035918.3054774.
- F. Bonchi, A. D. Giorgio, N. Haydon, and P. Sobocinski, “Diagrammatic algebra of first order logic,” arXiv:2401.07055, 2024, https://arxiv.org/abs/2401.07055.
- T. Catarci, M. F. Costabile, S. Levialdi, and C. Batini, “Visual query systems for databases: A survey,” Elsevier Journal of Visual Languages & Computing, vol. 8, no. 2, pp. 215–260, 1997, https://doi.org/10.1006/jvlc.1997.0037.
- T. Catarci and G. Santucci, “Query by diagram: A graphical environment for querying databases,” in SIGMOD, 1994, p. 515, https://doi.org/10.1145/191839.191976.
- H. C. Chan, K. K. Wei, and K. L. Siau, “User-database interface: The effect of abstraction levels on query performance,” MIS Quarterly, vol. 17, no. 4, pp. 441–464, 1993, https://doi.org/10.2307/249587.
- G. J. Clark and C. T. Wu, “DFQL: Dataflow query language for relational databases,” Information & Management, vol. 27, no. 1, pp. 1–15, 1994, https://doi.org/10.1016/0378-7206(94)90098-1.
- M. Correll and M. Gleicher, “The semantics of sketch: Flexibility in visual query systems for time series data,” in VAST, 2016, pp. 131–140, https://doi.org/10.1109/VAST.2016.7883519.
- J. Danaparamita and W. Gatterbauer, “Queryviz: Helping users understand SQL queries and their patterns,” in EDBT, 2011, pp. 558–561, https://doi.org/10.1145/1951365.1951440, https://queryvis.com/.
- R. G. Epstein, “The tabletalk query language,” Elsevier Journal of Visual Languages & Computing, vol. 2, no. 2, pp. 115–141, 1991, https://doi.org/10.1016/S1045-926X(05)80026-6.
- A. Fish and J. Howse, “Towards a default reading for constraint diagrams,” in 3rd International Conference on Theory and Application of Diagrams (DIAGRAMS). Springer, 2004, pp. 51–65, https://doi.org/10.1007/978-3-540-25931-2_8.
- D. Gao, H. Wang, Y. Li, X. Sun, Y. Qian, B. Ding, and J. Zhou, “Text-to-SQL empowered by large language models: A benchmark evaluation,” arXiv:2308.15363, 2023, https://doi.org/10.48550/arXiv.2308.15363.
- W. Gatterbauer, “Databases will visualize queries too,” PVLDB, vol. 4, no. 12, pp. 1498–1501, 2011, https://doi.org/10.14778/3402755.3402805.
- ——, “Interpreting and understanding relational database queries using diagrams,” International Conference on Theory and Application of Diagrams (DIAGRAMS) – Tutorials, 2022, http://www.diagrams-conference.org/2022/index.php/program/tutorials/.
- ——, “A tutorial on visual representations of relational queries,” PVLDB, vol. 16, no. 12, pp. 3890–3893, 2023, https://doi.org/10.14778/3611540.3611578, https://northeastern-datalab.github.io/visual-query-representation-tutorial/, https://northeastern-datalab.github.io/visual-query-representation-tutorial/slides/VLDB2023-VisualRepresentationsofRelationalQueries.pdf.
- W. Gatterbauer and C. Dunne, “On the reasonable effectiveness of Relational Diagrams: Explaining relational query patterns and the pattern expressiveness of relational languages,” PACMMOD (SIGMOD’24), vol. 2, no. 1, pp. 61:1–61:27, 2024, https://doi.org/10.1145/3639316, https://relationaldiagrams.com, Full version: https://arxiv.org/pdf/2401.04758.
- W. Gatterbauer, C. Dunne, H. Jagadish, and M. Riedewald, “Principles of query visualization,” Bulletin of the Technical Committee on Data Engineering (DEBull), vol. 45, no. 3, pp. 47–67, 2022, http://sites.computer.org/debull/A22sept/p47.pdf.
- J. Y. Gil, J. Howse, and S. Kent, “Constraint diagrams: A step beyond UML,” in Proc. of the Technology of Object-Oriented Languages and Systems (TOOLS), 1999, p. 453, https://doi.ieeecomputersociety.org/10.1109/TOOLS.1999.10066.
- D. Harel, “On visual formalisms,” Communications of the ACM (CACM), vol. 31, no. 5, pp. 514–530, 1988, https://doi.org/10.1145/42411.42414.
- E. C. Harel and E. R. McLean, “The effects of using a nonprocedural computer language on programmer productivity,” MIS Quarterly, vol. 9, no. 2, pp. 109–120, jun 1985, https://doi.org/10.2307/249112.
- N. Haydon and P. Sobocinski, “Compositional diagrammatic first-order logic,” in 11th International Conference on the Theory and Application of Diagrams (DIAGRAMS), ser. LNCS, vol. 12169. Springer, 2020, pp. 402–418, https://doi.org/10.1007/978-3-030-54249-8_32.
- J. Howse, “Diagrammatic reasoning systems,” in International Conference on Conceptual Structures (ICCS), ser. LNCS, vol. 5113. Springer, 2008, pp. 1–20, https://doi.org/10.1007/978-3-540-70596-3_1.
- H. Jaakkola and B. Thalheim, “Visual SQL – high-quality er-based query treatment,” in Workshops @ International Conference on Conceptual Modeling (ER), 2003, pp. 129–139, https://doi.org/10.1007/978-3-540-39597-3_13.
- M. Jarke and Y. Vassiliou, “A framework for choosing a database query language,” ACM Computing Surveys (CSUR), vol. 17, no. 3, pp. 313–340, 1985, https://doi.org/10.1145/5505.5506.
- S. Kent, “Constraint diagrams: Visualizing invariants in object-oriented models,” SIGPLAN Not., vol. 32, no. 10, pp. 327–341, oct 1997, https://doi.org/10.1145/263700.263756.
- G. L. Kindlmann and C. E. Scheidegger, “An algebraic process for visualization design,” IEEE Transactions on Visualization and Computer Graphics (TVCG), vol. 20, no. 12, pp. 2181–2190, 2014, https://doi.org/10.1109/TVCG.2014.2346325.
- D. J. L. Lee, J. Lee, T. Siddiqui, J. Kim, K. Karahalios, and A. G. Parameswaran, “You can’t always sketch what you want: Understanding sensemaking in visual query systems,” IEEE Transactions on Visualization and Computer Graphics (TVCG), vol. 26, no. 1, pp. 1267–1277, 2020, https://doi.org/10.1109/TVCG.2019.2934666.
- J. Leggett and G. Williams, “An empirical investigation of voice as an input modality for computer programming,” International Journal of Man-Machine Studies, vol. 21, no. 6, pp. 493–520, 1984, https://doi.org/10.1016/S0020-7373(84)80057-7.
- A. Leventidis, J. Zhang, C. Dunne, W. Gatterbauer, H. V. Jagadish, and M. Riedewald, “Queryvis: Logic-based diagrams help users understand complicated SQL queries faster,” in SIGMOD, 2020, pp. 2303–2318, https://doi.org/10.1145/3318464.3389767, https://queryvis.com/, Full version: https://osf.io/btszh/.
- M. Mannino and A. Abouzied, “Expressive time series querying with hand-drawn scale-free sketches,” in CHI, 2018, p. 388, https://doi.org/10.1145/3173574.3173962.
- D. Miedema and G. Fletcher, “SQLVis: Visual query representations for supporting SQL learners,” in VL/HCC, 2021, pp. 1–9, https://doi.org/10.1109/VL/HCC51201.2021.9576431.
- L. Mohan and R. L. Kashyap, “A visual query language for graphical interaction with schema-intensive databases,” EEE Transactions on Knowledge and Data Engineering (TKDE), vol. 5, no. 5, pp. 843–858, 1993, https://doi.org/10.1109/69.243513.
- A. Nandi, L. Jiang, and M. Mandel, “Gestural query specification,” PVLDB, vol. 7, no. 4, pp. 289–300, 2013, https://doi.org/10.14778/2732240.2732247.
- C. S. Peirce, “Collected papers of Charles Sanders Peirce. vol. 4,” The ANNALS of the American Academy of Political and Social Science, 1933, https://doi.org/10.1177/000271623417400185.
- B. Qin, B. Hui, L. Wang, M. Yang, J. Li, B. Li, R. Geng, R. Cao, J. Sun, L. Si, F. Huang, and Y. Li, “A survey on text-to-SQL parsing: Concepts, methods, and future directions,” arXiv:2208.13629, 2022, https://doi.org/10.48550/arXiv.2208.13629.
- P. Reisner, “Human factors studies of database query languages: A survey and assessment,” ACM Computing Surveys (CSUR), vol. 13, no. 1, pp. 13–31, 1981, https://doi.org/10.1145/356835.356837.
- P. Reisner, R. F. Boyce, and D. D. Chamberlin, “Human factors evaluation of two data base query languages: Square and sequel,” in Proceedings of the May 19-22, 1975, national computer conference and exposition (AFIPS). ACM, 1975, pp. 447–452, https:/doi.org/10.1145/1499949.1500036.
- D. D. Roberts, “The existential graphs,” Computers & Mathematics with Applications, vol. 23, no. 6, pp. 639–663, 1992, https://doi.org/10.1016/0898-1221(92)90127-4.
- J. F. Sowa, “Conceptual graphs for a data base interface,” IBM Journal of Research and Development, vol. 20, pp. 336–357, Jul. 1976, https://doi.org/10.1147/rd.204.0336.
- N. Tang, E. Wu, and G. Li, “Towards democratizing relational data visualization,” in SIGMOD, 2019, pp. 2025–2030, https://doi.org/10.1145/3299869.3314029.
- N. Tziavelis, W. Gatterbauer, and M. Riedewald, “Optimal join algorithms meet top-k,” in SIGMOD, 2020, pp. 2659–2665, https://doi.org/10.1145/3318464.3383132, https://northeastern-datalab.github.io/topk-join-tutorial/.
- ——, “Toward responsive DBMS: optimal join algorithms, enumeration, factorization, ranking, and dynamic programming,” in ICDE, 2022, pp. 3205–3208, https://doi.org/10.1109/ICDE53745.2022.00299, https://northeastern-datalab.github.io/responsive-dbms-tutorial/.
- J. Venn, “I. on the diagrammatic and mechanical representation of propositions and reasonings,” The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, vol. 10, no. 59, pp. 1–18, 1880, https://doi.org/10.1080/14786448008626877.
- M. Welsh, “The end of programming,” Communications of the ACM (CACM), vol. 66, no. 1, pp. 34–35, dec 2022, https://doi.org/10.1145/3570220.
- C. Welty and D. W. Stemple, “Human factors comparison of a procedural and a nonprocedural query language,” ACM Transactions on Database Systems (TODS), vol. 6, no. 4, pp. 626–649, 1981, https://doi.org/10.1145/319628.319656.
- M.-M. Yen and R. Scamell, “A human factors experimental comparison of SQL and QBE,” IEEE Transactions on Software Engineering (TSE), vol. 19, no. 4, pp. 390–409, 1993, https://doi.org/10.1109/32.223806.
- M. M. Zloof, “Query-by-example: A data base language,” IBM Systems Journal, vol. 16, no. 4, pp. 324–343, 1977, https://doi.org/10.1147/sj.164.0324.
- Wolfgang Gatterbauer (45 papers)