Added sqlite interface for ranking algorithm (#141)