Comparing SQL and Prolog -


I started learning progressl and am thinking about the theoretical difference from the SQL language.

For example:

  • Both declarative languages ​​are
  • Both support a fact-based knowledge database
  • Both support questions - Styling data - Retrieving
  • Both support functional dependency

Any more common points? Any remarkable differences? Most (earlier) answers here are a reflection of the fact that most people do not know that SQL What is it (its relational calculus implementation) or what it means (this is a form of projectionist logic).

  • These two are argumentative
  • They can repeat, express, and use relationships (logical connection in Prologue)

    • They can find out the facts and conclusions of both the facts (data in SQL)
    • They are both questions,
    • they are both [/ li]
    • both of them (Both have programming languages)
    • etc., etc.

    Generally, people do not know about these equivalents:

    1. "facts" and "data" are the same thing. It comes out directly from the original paper of the cod.
    2. "Relation" in relational theory is similar to a "table" in SQL, similar to parallelism or relational function, and in the set theory the same thing as a tupal-set
    3. An aliased table-expression in SQL (i.e., a scene, etc.) is similar to the rule in prol.

    So what are their differences? Although they work in the same conceptual domain, their focus is completely in different directions. In Prolog terms, SQL is primarily a fact and connection engine, whereas Prolog is primarily a rule and infringing engine. It can be done to a limited extent to each other, but with the small increase in complexity it becomes increasingly difficult. For example, you can do intranensing in SQL, but it is completely in nature and not like Prol's automatic forward infringing. And yes, you can store data in Prologue, but it's not quite ready for "collection, retrieval, projection and lack of transverse lines" with hundreds of SQL eagle users of SQL.

    Plus, SQL is primarily a server-language model, whereas Prolog is primarily client-language paradigm.


  • Comments

    Popular posts from this blog

    oracle - The fastest way to check if some records in a database table? -

    php - multilevel menu with multilevel array -

    jQuery UI: Datepicker month format -