A Prolog Implementation of an Entity-Relationship Based Database Management System