Precise Keywords Query for Relational Database in CMS Experiment

) Under complex data environment of Compact Muon Solenoid(CMS) experiment on the Large Hadron Collider(LHC), there are a number of relational data sources providing organization and distribution information for indexing the complex CMS data. To provide accurate keywords query function for data query system, this paper presents a keywords query system which can support different databases. By analyzing the database schema graph, this system can dynamically translate keywords Query Language(QL) into Structured Query Language(SQL) language. During this translation, the key issue is how to solve the ambiguity problem, therefore two algorithms are provided: a schema graph analysis algorithm based on query entities and a dynamic join algorithm based on a minimal weight tree generation. Experimental result shows that the dynamic join algorithm can calculate the connection mode of the database table for keywords query, make the keywords query system have high query efficiency, and meet the needs of users in real time, accurate query.