P-Analytics: A set of useful techniques to deal with entities and histories