Table of Contents
Fetching ...

TLSQL: Table Learning Structured Query Language

Feiyang Chen, Ken Zhong, Aoqian Zhang, Zheng Wang, Li Pan, Jianhua Li

TL;DR

TLSQL tackles the accessibility gap for table learning over relational databases by offering a SQL-like declarative interface that maps learning tasks to standard SQL queries and structured task descriptions. This design enables end-to-end workflows without data export or manual feature engineering, translating PREDICT, TRAIN, and VALIDATE declarations into executable SQL and metadata consumed by downstream learners. The system employs a Lexer-Parser-SQLGenerator pipeline, supports three levels of task specification, and demonstrates end-to-end relational table learning on real data (e.g., TML1M) with the BRIDGE model, illustrating practical database-centric ML workflows. Overall, TLSQL provides a practical foundation for integrating learning into SQL-centric database workflows and points toward future directions like natural-language to TLSQL generation.

Abstract

Table learning, which lies at the intersection of machine learning and modern database systems, has recently attracted growing attention. However, existing frameworks typically require explicit data export and extensive feature engineering, creating a high barrier for database practitioners. We present TLSQL (Table Learning Structured Query Language), a system that enables table learning directly over relational databases via SQL-like declarative specifications. TLSQL is implemented as a lightweight Python library that translates these specifications into standard SQL queries and structured learning task descriptions. The generated SQL queries are executed natively by the database engine, while the task descriptions are consumed by downstream table learning frameworks. This design allows users to focus on modeling and analysis rather than low-level data preparation and pipeline orchestration. Experiments on real-world datasets demonstrate that TLSQL effectively lowers the barrier to integrating machine learning into databasecentric workflows. Our code is available at https://github.com/rllmproject/tlsql/.

TLSQL: Table Learning Structured Query Language

TL;DR

TLSQL tackles the accessibility gap for table learning over relational databases by offering a SQL-like declarative interface that maps learning tasks to standard SQL queries and structured task descriptions. This design enables end-to-end workflows without data export or manual feature engineering, translating PREDICT, TRAIN, and VALIDATE declarations into executable SQL and metadata consumed by downstream learners. The system employs a Lexer-Parser-SQLGenerator pipeline, supports three levels of task specification, and demonstrates end-to-end relational table learning on real data (e.g., TML1M) with the BRIDGE model, illustrating practical database-centric ML workflows. Overall, TLSQL provides a practical foundation for integrating learning into SQL-centric database workflows and points toward future directions like natural-language to TLSQL generation.

Abstract

Table learning, which lies at the intersection of machine learning and modern database systems, has recently attracted growing attention. However, existing frameworks typically require explicit data export and extensive feature engineering, creating a high barrier for database practitioners. We present TLSQL (Table Learning Structured Query Language), a system that enables table learning directly over relational databases via SQL-like declarative specifications. TLSQL is implemented as a lightweight Python library that translates these specifications into standard SQL queries and structured learning task descriptions. The generated SQL queries are executed natively by the database engine, while the task descriptions are consumed by downstream table learning frameworks. This design allows users to focus on modeling and analysis rather than low-level data preparation and pipeline orchestration. Experiments on real-world datasets demonstrate that TLSQL effectively lowers the barrier to integrating machine learning into databasecentric workflows. Our code is available at https://github.com/rllmproject/tlsql/.
Paper Structure (9 sections, 4 figures)

This paper contains 9 sections, 4 figures.

Figures (4)

  • Figure 1: TLSQL compilation pipeline illustrated using the TML1M dataset li2024rllm, which comprises three interconnected tables: users, movies, and ratings.
  • Figure 2: End-to-end relational table learning with TLSQL.
  • Figure 3: A minimal example of the TLSQL programming interface.
  • Figure 4: Three-level specification in TLSQL.