A conceptual level database language for the entity relationship (ER) modelimplicitly contains integrities basic to ER concepts and special retrieval seman-tics for inheritances of attributes and relationships. Prolog, which belongs tothe logical and physical level, cannot be used as a foundation to directly definethe database language. It is shown how Prolog can be enhanced to under-stand the concepts of entities, relationships, attributes and is-a relationships.The enhanced Prolog is then used as a foundation to define the semantics of adatabase query language for the ER model. The three basic functions of modelspecification, updates and retrievas are defined.