User Tools

Site Tools


querying_a_gellish_english_database

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
querying_a_gellish_english_database [2018/11/17 20:09]
andries Updated
querying_a_gellish_english_database [2018/11/17 20:28] (current)
andries
Line 1: Line 1:
 ====== Querying databases ====== ====== Querying databases ======
-====== 1. Queries, questions and dialogues ​in Gellish ​======+====== 1. Queries, questions and dialogues ======
  
 Queries for conventional databases are usually expressed in a special query language, such as SQL. \\ Queries for conventional databases are usually expressed in a special query language, such as SQL. \\
-Gellish does not require a special query language, because queries can be expressed in Gellish in a nearly identical way as expressing ordinary statements. In a natural language there is no big difference between the structure of sentence that expresses a question and a sentence that expresses a statement. That same principle is applied in Gellish. If you know how to express ideas in Gellish, then you only need to know the few additional rules that are explained below in order to be able to write queries for [[:​gellish_databases|Gellish enabled ​database]]. The response to a Gellish Query consists of Gellish expressions. This implies that Software Agents and database systems should have import and export capabilities for Gellish expressions.+Gellish does not require a special query language, because queries can be expressed in Gellish in a nearly identical way as expressing ordinary statements. In a natural language there is no big difference between the structure of sentence that expresses a question and a sentence that expresses a statement. That same principle is applied in Gellish. If you know how to express ideas in Gellish, then you only need to replace knowns by unknowns according to the few additional rules that are explained below in order to be able to write queries for [[:​gellish_databases|Gellish enabled ​databases]]. The response to a Gellish Query consists of Gellish expressions ​as well. This implies that Software Agents and database systems should have not only import and export capabilities for ordinary ​Gellish expressions, but also for Gellish queries.
  
 There are basically two kinds of questions: There are basically two kinds of questions:
   * Questions that ask for something that is unknown   * Questions that ask for something that is unknown
-  * Requests that ask for a response (a confirmation,​ a promise, etc.)+  * Requests that ask for a response (a confirmation,​ a promise, etc.), although no unknowns are used
 Both kinds of queries and the responses to them are discussed below. Both kinds of queries and the responses to them are discussed below.
  
Line 73: Line 73:
  
 === 2.2.3 Constraints about different kinds of objects === === 2.2.3 Constraints about different kinds of objects ===
-Some queries include constraints about different kinds of objects. For example, we may ask for pumps as well as compressors. In such a case the different unknown objects should be distinguished to enable to specify that one constraint is applicable to objects of one kind and the other constraint is applicable to objects of another kind. For example, if we ask for pumps as well as for compressors,​ then the result should be things that are classified either as a pump or as a compressor, and the query is not about objects that are classified both as a pump and as a compressor (such facts should not be present in a database). The distinction between the two objects can be made by giving them a different UID. The example query about pumps and compressors should therefore be expressed as follows (leaving away the other UID's): \\ +Some queries include constraints about different kinds of objects. For example, we may ask for pumps as well as compressors. In such a case the different unknown objects should be distinguished to enable to specify that one constraint is applicable to objects of one kind and the other constraint is applicable to objects of another kind. For example, if we ask for pumps as well as for compressors,​ then the result should be things that are classified either as a pump or as a compressor, and the query is not about objects that are classified both as a pump and as a compressor (such facts should not be present in a database). The distinction between the two objects can be made by giving them a different UID. An example query about pumps and compressors should therefore be expressed as follows (leaving away the other UIDs): \\ 
-^UID of left hand object^Name of left hand object^Name of relation type^Name of right hand object^ +^Intention^UID of left hand object^Name of left hand object^Name of relation type^Name of right hand object^ 
-|  1 |  what |  is classified as a |  pump| +|query|  1 |  what-1 |  is classified as a |  pump| 
-|  2 |  what |  is classified as a |  compressor| +|query|  2 |  what-2 |  is classified as a |  compressor| 
-//Table 4, Example of a query about different ​object types//+//Table 4, Example of a query about different ​kinds of objects//
 ====== 3. Requests and responses ====== ====== 3. Requests and responses ======
-Questions sometimes have a structure that is difficult to distinguish from statements. In spoken language they are usually distinguished by the tone, the melody of the sentence. In written ​English, a question mark is then added. Gellish ​English ​supports such kinds of expressions by enabling the explicit expression of the ‘communication intent’ of the author of the expression. This enables to express various intentions, such as:+Questions sometimes have a structure that is difficult to distinguish from statements. In spoken language they are usually distinguished by the tone, the melody of the sentence. In written ​languageusually ​a question mark is then added. Gellish supports such kinds of expressions by enabling the explicit expression of the ‘communication intent’ of the author of the expression. This enables to express various intentions, such as:
   * a question   * a question
   * a request   * a request
Line 91: Line 91:
   * an acceptance   * an acceptance
  
-  * Note: The ‘allowed values’ for the intention can be found in the Gellish ​English ​dictionary as qualitative ​classes ​that are a qualification ​of ‘intention’ or one of its subtypes. \\ \\+  * Note: The ‘allowed values’ for the intention can be found in the Gellish dictionary as qualitative ​kinds that are a qualitative subtype ​of ‘intention’ or one of its subtypes. \\ \\
 Such an ‘intention’ indicates whether or to what extent something is the case according to the author of the expression. In other words, it indicates the extent to which the relation expresses what is the case or it indicates the status of the process to become the case. This is called the “intention” of the proposition. So, an intention is a quality of an expression that thus can express not only that a proposition is a //​question//,​ but it can also express that it is a //​confirmation//,​ a //​probability//,​ etc. For example, the flowing table contains a proposition with the intent to be a questions and the same proposition that is qualified as a confirmation:​ \\ Such an ‘intention’ indicates whether or to what extent something is the case according to the author of the expression. In other words, it indicates the extent to which the relation expresses what is the case or it indicates the status of the process to become the case. This is called the “intention” of the proposition. So, an intention is a quality of an expression that thus can express not only that a proposition is a //​question//,​ but it can also express that it is a //​confirmation//,​ a //​probability//,​ etc. For example, the flowing table contains a proposition with the intent to be a questions and the same proposition that is qualified as a confirmation:​ \\
-^Name of left hand object^Intention^Name of relation type^Name of right hand object^ +^Intention^Name of left hand object^Name of relation type^Name of right hand object^ 
-|  P-1 |  question ​|  is classified as a |  pump| +|  question ​|  P-1 |  is classified as a |  pump| 
-|  P-1 |  confirmation ​|  is classified as a |  pump|+|  confirmation ​|  P-1 |  is classified as a |  pump|
 //Table 5, Examples of expressions about intentions of a proposition,​ without unknown objects// \\ //Table 5, Examples of expressions about intentions of a proposition,​ without unknown objects// \\
-This means that basically the same proposition can be used for different purposes in a communication. ​This implies that the above two lines express two different opinions about the same fact.+Note that the second expression can be a response to the first expression. \\ 
 +This means that basically the same proposition can be used for different purposes in a communication. ​We can also say that this implies that the above two lines express two different ​ideas or opinions about the same fact.
 ====== 4. Author, date and time of propositions ====== ====== 4. Author, date and time of propositions ======
-The ‘author’ and the moment of creation of a proposition such as a question or an answer can be added as auxiliary ​facts to a Gellish ​English ​expression. A Gellish ​Database ​table has dedicated columns for that: the date of creation of a fact (a date/​time) ​and the originator (of the latest change). As there are many ways in which a date/time can be expressed, a Gellish ​Database ​uses the standard ‘[http://​support.microsoft.com/​kb/​q180162/​ 1900 date system]’ convention to make the date/time computer interpretable. A user interface may present it in any notation. \\+The ‘author’ and the moment of creation of a proposition such as a question or an answer can be added as contextual ​facts to a Gellish expression. A Gellish ​expression ​table has dedicated columns for that: the date-time of creation of a fact and the originator (of the latest change). As there are many ways in which a date-time can be expressed, a Gellish uses the standard ‘[http://​support.microsoft.com/​kb/​q180162/​ 1900 date system]’ convention to make the date-time computer interpretable. A user interface may convert and present it in any notation. \\
 For example: \\ For example: \\
-^Name of left hand object^Intention^Name of relation type^Name of right hand object^Date of creation of fact (start of validity)^Date of latest change^Author (of latest change)^Source or reference^ +^Intention^Name of left hand object^Name of relation type^Name of right hand object^Date of creation of fact (start of validity)^Date of latest change^Author (of latest change)^Source or reference^ 
-|  P-1 |  question ​|  is classified as a |  pump |  20 Aug'07 |  20 Aug07 |  John Doe |  +|  question ​|  P-1 |  is classified as a |  pump |  20 Aug'07 |  20 Aug07 |  John Doe |  
-|  P-1 |  confirmation ​|  is classified as a |  pump |  20 Aug07 |  20 Aug{{{//​}}}07 |  Andrew |  my database| +|  confirmation ​|  P-1 |  is classified as a |  pump |  20 Aug07 |  20 Aug{{{//​}}}07 |  Andrew |  my database| 
-//Table 6, Example of a question and confirmation by an explit ​author at a particular date, without unknown objects//+//Table 6, Example of a question and confirmation by an explicit ​author at a particular date, without unknown objects//
  
-  * Note that these expressions are about the same fact. Therefore the fact identifier will be the same for these propositions,​ even if a statement is modified later, e.g. when at a later date the confirmation is changed into a denial. 
  
 //​**Continue with**// [[:Gellish Semantic Web]] //​**Continue with**// [[:Gellish Semantic Web]]
querying_a_gellish_english_database.txt · Last modified: 2018/11/17 20:28 by andries