Finished TermFrqeuencyDBHandler and Test cases.