Abstract
We describe the design and implementation of a declarative database query language for manipulating character strings. The language can be used to create logical predicates expressing structural properties of strings and relations between several strings. The predicates can be used to query strings in databases, and by leaving variables uninstantiated, also to generate new strings not contained in the database. A full working system was implemented as an extension of an object-oriented database management system and its query language. The declarative expressions are evaluated by first performing a compilation transforming them to nondeterministic finite state automata and then by simulating these automata using a depth-first search engine. The system checks the safety of each string-manipulation query in advance to preclude infinite ones. This safety checking provides also a compile-time loop-checking mechanism for the search engine, improving its efficiency.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Abiteboul, S., Hull, R., and Vianu, V. Foundations of Databases: the Logical Level. Addison-Wesley 1995.
Atkinson, M., Bancilhon, F., DeWitt, D. et al. The object-oriented database system manifesto. In Deductive and object-oriented databases: Proceedings of the First International Conference on Deductive and Object-Oriented Databases (DOOD89) (1989), pp. 223–240.
Ganguly, S., and Noordewier, M. Proximal: a database system for the efficient retrieval of genetic information. Computers in Biology and Medicine 26,3(1996), 199–207.
Ginsburg, A., and Wang, X.S. Regular sequence operations and their use in database queries. Journal of Computer and System Sciences 56, 1(1998), pp. 1–26.
Grahne, G., Hakli, R., Nykänen, M., and Ukkonen, E. AQL: an alignment based language for querying string databases. To appear in Ninth International Conference on Management of Data (COMAD’98).
Grahne, G., Nykänen, M. Safety, translation and evaluation of Alignment Calculus. In Proceedings of the First East-European Symposium on Advances in Databases and Information Systems (ADBIS’97) (1997), pp. 295–304.
Grahne, G., Nykänen, M., and Ukkonen, E. Reasoning about strings in databases. In Proceedings of the 13th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (1994), pp. 303–312.
Grahne, G., Nykänen, M., and Ukkonen, E. Reasoning about strings in databases. To appear in the Journal of Computer and System Sciences (JCSS).
Helgesen, C., and Sibbald, P.R. PALM-a pattern language for molecular biology. In Proceedings of the First International Conference on Intelligent Systems in Molecular Biology (1993), pp. 172–180.
Hopcroft, J.E., and Ullman, J.D. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley 1979.
Kekkonen, M., Koskelainen, J., Niemi, J., Tuononen, T., Vihervaara, A., and Vuolasto, J. Design document for the BiO2 system (in Finnish). Tech. rep., Department of Computer Science, University of Helsinki, Finland, 1997.
Krishnamurthy, R., Ramakrishnan, R., and Shmueli, O. A framework for testing safety and effective computability. Journal of Computer and System Sciences 52 (1996), pp. 100–124.
Mecca, G., and Bonner, A.J. Sequences, Datalog and transducers. In ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (1995), pp. 23–35.
Nykänen, M. Querying String Databases with Modal Logic, PhD thesis, Department of Computer Science, University of Helsinki, Helsinki, 1997.
Nykänen, M. Using acceptors as transducers. To appear in Third International Workshop on Implementing Automata (WIA’98).
O2C User Manual. O2 Technology 1996.
OQL User Manual. O2 Technology 1996.
Ramakrishnan, R., Bancilhon, F., and Silberschatz, A. Safety of recursive Horn clauses with infinite relations (extended abstract). In Proceedings of the 6th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (1987), pp. 328–339.
Richardson, J. Supporting lists in a data model (a timely approach). In Very Large Data Bases Conference (1992), pp. 127–138.
Searls, D.B. String variable grammar: a logic grammar formalism for the biological language of DNA. The Journal of Logic Programming 24, 1&2 (1995), 73–102.
Sedgewick, R. Algorithms, 2nd edition. Addison-Wesley 1988.
Seshadri, P., Livny, M., and Ramakrishnan, R. The case for extended Abstract Data Types. In Very Large Data Bases Conference (1997), pp. 66–75.
Stoesser, G., Sterk, P., Tuli, M.A., et al. The EMBL Nucleotide Sequence Database. Nucleic Acids Research 25, 1(1997), pp. 7–13.
Wielemaker, J. SWI-Prolog Reference Manual. University of Amsterdam, The Netherlands, http://www.swi.psy.uva.nl/usr/jan/SWI-Prolog/Manual/Title.html, 1997.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hakli, R., Nykänen, M., Tamm, H., Ukkonen, E. (1998). Implementing a Declarative String Query Language with String Restructuring. In: Gupta, G. (eds) Practical Aspects of Declarative Languages. PADL 1999. Lecture Notes in Computer Science, vol 1551. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-49201-1_13
Download citation
DOI: https://doi.org/10.1007/3-540-49201-1_13
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65527-5
Online ISBN: 978-3-540-49201-6
eBook Packages: Springer Book Archive