In recent years, the database technology has been widely used in a few fields. The keyword search technology based on relational databases does not require users to master any knowledge of SQL grammar and database schema. Users only need to input keywords, and conveniently search information via keyword like internet search engines. As results, users are pleased to use the technology. In this paper, we employee a query expansion plan based on the query sentence, and propose a query expansion method based on thesaurus. The method matches key words with the thesaurus. If the key word matches a word in the thesaurus, and the words in the same row are used as a synonym for the key word. Test results show that the recall and precision ratio of the system are satisfied with needs of applications.