Effective keyword search in relational databases

Fang Liu, Clement Yu, Weiyi Meng, Abdur Chowdhury2006 · DOI

TL;DR

This paper tackles the challenge of making relational databases searchable with simple keywords, much like web search engines. They introduce a novel ranking strategy that goes beyond basic keyword matching by considering the structure of relational data and incorporating advanced IR techniques, leading to significantly more effective search results.

What Problem Does This Paper Address?

Traditional relational databases require users to understand complex schemas and query languages like SQL. While some systems offer full-text search, they still fall short for ordinary users who prefer the simplicity of keyword search. The core problem is bridging the gap between the structured nature of relational databases and the intuitive, unstructured keyword search experience users are accustomed to from the web. This involves handling answers that are not single records but complex structures (tuple trees) formed by joining data across multiple tables, and developing effective ranking mechanisms for these complex answers.

Methods

The paper proposes a novel ranking strategy for keyword search in relational databases. The approach involves three main steps:

  1. Answer Generation: Candidate answers are generated in the form of "tuple trees," which are essentially joined tuples from multiple tables that collectively contain the query keywords. This process is guided by the database schema, modeled as a schema graph.
  2. Ranking Strategy: This is the core contribution. The authors identify four critical factors for effective ranking in relational databases:
  3. Tuple Tree Size Normalization: Accounts for the fact that larger tuple trees (more joins) might appear more relevant but can also dilute the impact of individual keywords.
  4. Document Length Normalization: Addresses the varying lengths of text fields (e.g., song titles vs. lyrics) and normalizes term weights accordingly, considering both local and global document lengths.
  5. Document Frequency Normalization: Uses global document frequencies to better discriminate terms across different tables and columns.
  6. Inter-Document Weight Normalization: Combines weights from different text fields within a tuple tree to form a unified score. They also introduce schema term identification to correctly handle keywords that refer to database elements (like "lyrics" or "album") versus content keywords. Furthermore, they propose phrase-based and concept-based ranking models to capture more nuanced meanings and improve relevance.

  7. Semantic Output: The system aims to return answers with basic semantics, linking query concepts to database elements.

Datasets

The primary dataset used for evaluation is a lyrics database containing over 177,000 songs. This database was constructed by crawling a lyrics website. The paper also uses a set of 50 real-world user queries collected from a major search engine's query logs, which were then manually assessed for relevance.

Key Insights and Ideas

  • Tuple Trees as Answers: The fundamental unit of an answer in relational keyword search isn't a single record but a "tuple tree" formed by joining related tuples. This is a key difference from traditional document retrieval.
  • Beyond Simple TF-IDF: Standard IR ranking techniques need significant adaptation for relational data. The paper highlights that factors like tuple tree size and the varying lengths of text fields within a database are crucial for effective ranking.
  • Schema Terms Matter: Distinguishing between keywords that refer to database schema elements (like "artist" or "album") and content keywords is vital for accurate search.
  • Phrases and Concepts Enhance Relevance: Treating query keywords as phrases and identifying underlying "concepts" (which can be phrases or individual keywords) leads to more meaningful and accurate search results.
  • Comprehensive Evaluation is Key: The authors emphasize the importance of rigorous experimental evaluation using real-world data and standard IR metrics to demonstrate the effectiveness of their proposed strategy.

Key Results

The proposed ranking strategy significantly outperforms existing methods. Key findings include:

  • The four proposed normalization factors (tuple tree size, document length, document frequency, and inter-document weight) are critical for search effectiveness, with tuple tree size and document length normalization showing the most significant improvements, especially for complex queries.
  • Phrase-based and concept-based search models offer substantial improvements over simple keyword matching.
  • The best performing model (Concept with schema term identification) achieved a 16.3% improvement over Google and a 77.4% improvement over the best related work (Hristidis et al. [11]).
  • The proposed approach significantly outperforms related work on both complex and simple queries, with a more pronounced effect on complex queries.

Limitations and Future Work

  • Efficiency Not the Focus: The paper prioritizes search effectiveness and does not deeply investigate the efficiency of answer generation or ranking.
  • Manual Schema Term Identification: While effective, the identification of schema terms currently requires manual effort or semi-automatic methods.
  • Future Work: The authors plan to incorporate link structures (beyond primary key-foreign key relationships), non-textual data (like ratings or box-office income), and conduct experiments on a wider variety of real-world databases (movie, academic, product, job databases) and more user queries. They also aim to investigate the efficiency aspects of their approach.

Summary updated

Abstract

With the amount of available text data in relational databases growing rapidly, the need for ordinary users to search such information is dramatically increasing. Even though the major RDBMSs have provided full-text search capabilities, they still require users to have knowledge of the database schemas and use a structured query language to search information. This search model is complicated for most ordinary users. Inspired by the big success of information retrieval (IR) style keyword search on the web, keyword search in relational databases has recently emerged as a new research topic. The differences between text databases and relational databases result in three new challenges: (1) Answers needed by users are not limited to individual tuples, but results assembled from joining tuples from multiple tables are used to form answers in the form of tuple trees. (2) A single score for each answer (i.e. a tuple tree) is needed to estimate its relevance to a given query. These scores are used to rank the most relevant answers as high as possible. (3) Relational databases have much richer structures than text databases. Existing IR strategies to rank relational outputs are not adequate. In this paper, we propose a novel IR ranking strategy for effective keyword search. We are the first that conducts comprehensive experiments on search effectiveness using a real world database and a set of keyword queries collected by a major search company. Experimental results show that our strategy is significantly better than existing strategies. Our approach can be used both at the application level and be incorporated into a RDBMS to support keyword-based search in relational databases.
BibTeX
@misc{liu2006effective,
  author = {Fang Liu and Clement Yu and Weiyi Meng and Abdur Chowdhury},
  title = {{Effective keyword search in relational databases}},
  year = {2006},
  doi = {10.1145/1142473.1142536},
}
Figure