Learning Database Queries with Prolog Cover Image

Learning Database Queries with Prolog
Learning Database Queries with Prolog

Author(s): Ekaterina OREHOVA, Sergey GOVYAZIN, Iurii STROGANOV
Subject(s): Social Sciences, Education, Higher Education
Published by: Carol I National Defence University Publishing House
Keywords: teaching; databases; Prolog; entity-relationship model; SQL; object-relational mapping;

Summary/Abstract: A database is a collection of some knowledge. Knowledge can be presented as some semantic network. Entity-relationship model is one of representations of the semantic network. When using the entity-relationship model, it is possible to distinguish entities and relations between these entities. The entity-relationship model can be then converted into a database schema. The user interacts with the database by writing requests and receiving answers containing the requested information. There are several ways to write queries to databases with different convenience of creating and speed of execution. The article reviews three different approaches to writing queries: SQL query, Prolog query and Object-Relational Mapping (ORM) query. Each of the approaches has its own advantages and disadvantages. You need to know the basics of relational algebra to write queries with the SQL language, while ORM libraries and the Prolog don't require any additional knowledge. Writing queries with the Prolog language is similar to writing text in natural language, which makes these queries understandable for people who have never worked with databases. There was made the comparison of the plainness of the approaches when explaining them to listeners who are studying databases. The listeners participated in the compilation were divided into groups according to their specialties. The following groups took part in the study: first-year students of an economic and managerial specialty, engineering students and students with a specialty software engineering. The purpose of this comparison is to determine the method of compiling database queries, which is most suitable for teaching students of various specialties.

  • Issue Year: 15/2019
  • Issue No: 02
  • Page Range: 265-272
  • Page Count: 8
  • Language: English