Fix sql sentence in Casket lib.
Fix bug of treating table name
Fix implementation of ngram.
Fix sql bug.
Fix search column threading bug.
Link relation info with database.