sqlite for history & favourite