Inheritance and Polymorphism in Datalog: an experience in Model Management