Prolog is a logic programming language. It has important role in artificial intelligence. Unlike many other programming languages, Prolog is intended primarily as a declarative programming language. In prolog, logic is expressed as relations (called as Facts and Rules). Heart of prolog lies at the logic being applied. Formulation or Computation is carried out by running a query over these relations.