Searching by keywords on a relational database is enabled by performing
preprocessing operations to construct lookup tables at an interim level of
granularity, such as column location. A keyword search is performed on the
lookup tables rather than the database tables to determine database column
locations of the keyword. Schema information about the database is used to
link the column locations to form database subgraphs that span the
keywords. Join tables are to generated based on the subgraphs consisting
of columns containing the keywords. A query on the database is generated
to join the tables and retrieve database rows that contain the keywords.
The retrieved rows are ranked in order of relevance before being output.
By preprocessing a relational database to form lookup tables, and
initially searching the lookup tables to obtain a targeted subset of the
database upon which SQL queries can be performed to collect data records,
keyword searching on relational database is made efficient.