Fast algorithms for mining generalized association rules and sequential patterns in massive databases