{'fraction_non_alphanumeric': 0.02169491525423729, 'fraction_numerical': 0.0, 'mean_word_length': 5.443231441048035, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Middleware Approach to Temporal Query Processing

Time-referenced, or temporal, data occur pervasively in most real-world databases. Recent advances in temporal query languages show that such applications may benefit substantially from a database management system (DBMS) with built-in temporal support. The potential benefits are several: application code is simplified and more easily maintainable, thereby increasing programmer productivity, and more data processing can be left to the DBMS, potentially leading to better performance. In contrast, the built-in temporal support offered by current database products is limited to predefined, time-related data types, e.g., the Informix TimeSeries DataBlade and the Oracle TimeSeries cartridge, and extensibility facilities that enable the user to define new, e.g., temporal, data types. However, temporal support is needed that goes beyond data types and extends the query language itself, as well as integrates temporal operations into the query optimization and processing framework. This Ph.D. thesis presents an algebraic foundation for temporal query representation, optimization, and processing, as well as an implementation of the foundation in a layered architecture. The foundation includes an algebra for temporal query representation, a comprehensive set of transformation rules, and a query plan enumeration algorithm. The algebra enhances existing relational algebras based on multisets by integrating the handling of order and adding temporal support, and the transformation rules are divided into different types according to how they deal with duplicates, order, and time periods. By capturing duplicate removal and retention and order preservation for all queries, as well as coalescing for temporal queries, the foundation formalizes and generalizes existing approaches. The foundation is suitable for introducing temporal support both via a stand-alone temporal DBMS and via a layer on top of a conventional DBMS. The foundation has been implemented using a temporal middleware layer on top of a conventional DBMS. The middleware accepts SQL and temporal SQL queries as input, and determines which query parts it has to evaluate itself and which query parts it has to pass to the underlying DBMS. It then coordinates and takes part in query processing, delivering the final result to the user application. To optimize and process queries, the middleware employs the Volcano extensible query optimizer and the XXL library of query processing algorithms, as well as Oracle as the underlying DBMS. Volcano was significantly extended to support new operators, algorithms, and transformation rules of different types; and the XXL library was augmented by new temporal algorithms. Performance experiments have been conducted, showing that allocating some query processing to the middleware may improve query performance up to an order of magnitude over performing it all in the DBMS.