Query language: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎References: Remove hardcoded interwiki link, since the correct link is on wikidata
Tags: Mobile edit Mobile web edit Advanced mobile edit
(41 intermediate revisions by 30 users not shown)
Line 1: Line 1:
{{Short description|Computer language used to make queries into databases and information systems}}
{{redirect|Database language|other types of database languages|Database#Languages}}
{{Multiple issues|
{{Multiple issues|
{{prose|date=October 2010}}
{{refimprove|date=October 2010}}
{{refimprove|date=October 2010}}
{{lacking overview|date=April 2018}}
{{lacking overview|date=April 2018}}
{{lead too short|date=April 2018}}
}}
}}


'''Query languages''', '''data query languages''' or '''database query languages''' ('''DQLs''') are [[computer language]]s used to make queries in [[database]]s and [[information system]]s.
A '''query language''', also known as '''data query language''' or '''database query language''' ('''DQL'''), is a [[computer language]] used to make queries in [[database]]s and [[information system]]s. In database systems, query languages rely on strict theory to retrieve information.<ref>{{Cite journal |last=Schmitt |first=Ingo |date=January 2008 |title=QQL: A DB&IR Query Language |url=https://link.springer.com/article/10.1007/s00778-007-0070-1 |journal=The VDLB Journal 17 |volume=17 |pages=39–56 |doi=10.1007/s00778-007-0070-1 |s2cid=207032530 |via=ACM Digital Library}}</ref> A well known example is the [[Structured Query Language]] (SQL).


==Types==
==Types==
Broadly, query languages can be classified according to whether they are database query languages or [[information retrieval query language]]s. The difference is that a database query language attempts to give factual answers to factual questions, while an information retrieval query language attempts to find documents containing information that is relevant to an area of inquiry.
Broadly, query languages can be classified according to whether they are database query languages or information retrieval query languages. The difference is that a database query language attempts to give factual answers to factual questions, while an information retrieval query language attempts to find documents containing information that is relevant to an area of inquiry. Other types of query languages include:

* '''Full-text'''. The simplest query language is treating all terms as bag of words that are to be matched with the postings in the [[inverted index]] and where subsequently ranking models are applied to retrieve the most relevant documents. Only tokens are defined in the CFG. Web search engines often use this approach.
* '''Boolean'''. A query language that also supports the use of the [[logical connective|Boolean operator]]s AND, OR, NOT.
* '''Structured'''. A language that supports searching within (a combination of) fields when a document is structured and has been indexed using its document structure.
* '''Natural language'''. A query language that supports natural language by parsing the natural language query to a form that can be best used to retrieve relevant documents, for example with [[Question answering]] systems or [[conversational search]].


==Examples==
==Examples==


* [https://wiki.opencog.org/w/Pattern_matching Atomese], the graph query language for the [[OpenCog]] graph database, the [https://wiki.opencog.org/w/AtomSpace AtomSpace].
* [[Attempto Controlled English]] is a query language that is also a [[controlled natural language]].<ref name="FLAIRS 2006">{{cite conference |author1=Norbert E. Fuchs |author2=Kaarel Kaljurand |author3=Gerold Schneider | title = Attempto Controlled English Meets the Challenges of Knowledge Representation, Reasoning, Interoperability and User Interfaces | book-title = FLAIRS 2006 | date = 2006 | url = http://attempto.ifi.uzh.ch/site/publications/papers/FLAIRS0601FuchsN.pdf }}</ref>
* [[Attempto Controlled English]] is a query language that is also a [[controlled natural language]].<ref name="FLAIRS 2006">{{cite conference |author1=Norbert E. Fuchs |author2=Kaarel Kaljurand |author3=Gerold Schneider | title = Attempto Controlled English Meets the Challenges of Knowledge Representation, Reasoning, Interoperability and User Interfaces | book-title = FLAIRS 2006 | date = 2006 | url = http://attempto.ifi.uzh.ch/site/publications/papers/FLAIRS0601FuchsN.pdf }}</ref>
* [[AQL (ArangoDB Query Language)|AQL]] is a query language for the [[ArangoDB]] native multi-model database system.
* [[AQL (ArangoDB Query Language)|AQL]] is a query language for the [[ArangoDB]] native multi-model database system.
* [[.QL]] is a proprietary object-oriented query language for querying [[relational database]]s; successor of Datalog;
* [[.QL]] is a proprietary object-oriented query language for querying [[relational database]]s; successor of Datalog;
* [[CodeQL]] is the analysis engine used by developers to automate security checks, and by security researchers to perform variant analysis on [[GitHub]].
* [[Contextual Query Language]] (CQL) a formal language for representing queries to [[information retrieval]] systems such as web indexes or bibliographic catalogues.
* [[Contextual Query Language]] (CQL) a formal language for representing queries to [[information retrieval]] systems such as web indexes or bibliographic catalogues.
* CQLF (CODYASYL Query Language, Flat) is a query language for [[CODASYL]]-type databases;
* [[Concept-Oriented Query Language]] (COQL) is used in the concept-oriented model (COM). It is based on a novel [[data modeling]] construct, concept, and uses such operations as projection and de-projection for multi-dimensional analysis, analytical operations and inference;
* [[Cypher Query Language|Cypher]] is a query language for the [[Neo4j]] graph database;
* [[Cypher Query Language|Cypher]] is a query language for the [[Neo4j]] graph database;
* [[Data Mining Extensions|DMX]] is a query language for [[data mining]] models;
* [[Data Mining Extensions|DMX]] is a query language for [[data mining]] models;
* [[Datalog]] is a query language for [[deductive database]]s;
* [[Datalog]] is a query language for [[deductive database]]s;
* [[Discovery Query Language]] is a query language for accessing Watson Discovery Services on [[IBM Cloud]];<ref>{{cite web
| title = Getting Started with Querying
| url = https://cloud.ibm.com/docs/discovery?topic=discovery-getting-started-with-querying
| access-date = July 29, 2020
| publisher = IBM
}}</ref>
* [[F-logic]] is a declarative object-oriented language for [[deductive database]]s and [[knowledge representation]].
* [[F-logic]] is a declarative object-oriented language for [[deductive database]]s and [[knowledge representation]].
* [[Facebook Query Language|FQL]] enables you to use a [[SQL]]-style interface to query the data exposed by the [[Graph API]]. It provides advanced features not available in the [[Graph API]].<ref>{{cite web|url=https://developers.facebook.com/docs/technical-guides/fql/|title=FQL Overview|work=Facebook Developers|access-date=2013-12-11|archive-url=https://web.archive.org/web/20131218130320/https://developers.facebook.com/docs/technical-guides/fql/|archive-date=2013-12-18|url-status=dead}}</ref>
* [[Facebook Query Language|FQL]] enables you to use a [[SQL]]-style interface to query the data exposed by the [[Graph API]]. It provides advanced features not available in the [[Graph API]].<ref>{{cite web|url=https://developers.facebook.com/docs/technical-guides/fql/|title=FQL Overview|work=Facebook Developers|access-date=2013-12-11|archive-url=https://web.archive.org/web/20131218130320/https://developers.facebook.com/docs/technical-guides/fql/|archive-date=2013-12-18|url-status=dead}}</ref>
Line 38: Line 33:
* [[ISBL]] is a query language for [[PRTV]], one of the earliest relational database management systems;
* [[ISBL]] is a query language for [[PRTV]], one of the earliest relational database management systems;
* [[Jaql]] is a functional data processing and query language most commonly used for JSON query processing;
* [[Jaql]] is a functional data processing and query language most commonly used for JSON query processing;
* [[Jq (programming language)|jq]] is a functional programming language often used for processing queries against one or more [[JSON]] documents, including very large ones;
* [[JSONiq]] is a declarative query language designed for collections of [[JSON]] documents;
* [[JSONiq]] is a declarative query language designed for collections of [[JSON]] documents;
* [[Microsoft Kusto|Kusto]] or KQL, is a query language used in [[Azure Data Explorer]] and the CMPivot tool in [[Microsoft System Center Configuration Manager]]
* [[LINQ]] query-expressions is a way to query various data sources from [[.NET Framework|.NET]] languages
* [[LDAP]] is an [[application protocol]] for querying and modifying [[directory services]] running over [[TCP/IP]];
* [[LDAP]] is an [[application protocol]] for querying and modifying [[directory services]] running over [[TCP/IP]];
* LogiQL is a variant of Datalog and is the query language for the LogicBlox system.
* LogiQL is a variant of Datalog and is the query language for [[LogicBlox|the LogicBlox system]].
* [[M Formula language]], a [[Mashup (web application hybrid)|mashup]] query language used in Microsoft's Power Query
* [[Molecular Query Language|MQL]] is a [[cheminformatics]] query language for a [[substructure search]] allowing beside nominal properties also numerical properties;
* [[Molecular Query Language|MQL]] is a [[cheminformatics]] query language for a [[substructure search]] allowing beside nominal properties also numerical properties;
* [[MultiDimensional eXpressions|MDX]] is a query language for [[OLAP]] databases;
* [[MultiDimensional eXpressions|MDX]] is a query language for [[OLAP]] databases;
* [[N1QL]] is a [[Couchbase, Inc.|Couchbase]]'s query language finding data in [[Couchbase Server]]s;
* [[N1QL]] is a [[Couchbase, Inc.|Couchbase]]'s query language finding data in [[Couchbase Server]]s;
* [[Object Query Language|OQL]] is Object Query Language;
* [[Object Query Language]]
* [[Object Constraint Language|OCL]] (Object Constraint Language). Despite its name, OCL is also an object query language and an [[Object Management Group|OMG]] standard;
* [[Object Constraint Language|OCL]] (Object Constraint Language). Despite its name, OCL is also an object query language and an [[Object Management Group|OMG]] standard;
* [[OPath]], intended for use in querying [[WinFS]] ''Stores'';
* [[OPath]], intended for use in querying [[WinFS]] ''Stores'';
* OttoQL, intended for querying tables, [[XML]], and databases;
* [[Poliqarp Query Language]] is a special query language designed to analyze annotated text. Used in the [[Poliqarp]] search engine;
* [[Poliqarp Query Language]] is a special query language designed to analyze annotated text. Used in the [[Poliqarp]] search engine;
* [[PQL]] is a [[special-purpose programming language]] for managing [[process model]]s based on information about [[wiktionary:Scenario|scenarios]] that these models describe;
* PQL is a [[special-purpose programming language]] for managing [[process model]]s based on information about [[wiktionary:Scenario|scenarios]] that these models describe;
* [[PRQL]] [https://prql-lang.org/ PRQL] (Pipelined Relational Query Language) is a modern language for transforming data. Consists of a curated set of orthogonal transformations, which are combined together to form a pipeline.
* [[PTQL]] based on relational queries over program traces, allowing programmers to write expressive, declarative queries about program behavior.
* [[PTQL]] based on relational queries over program traces, allowing programmers to write expressive, declarative queries about program behavior.
* [[QUEL query languages|QUEL]] is a [[relational database]] access language, similar in most ways to [[SQL]];
* [[QUEL query languages|QUEL]] is a [[relational database]] access language, similar in most ways to [[SQL]];
* [[RDQL]] is a [[Resource Description Framework|RDF]] query language;
* [[RDQL]] is a [[Resource Description Framework|RDF]] query language;
* [[ReQL]] is a query language used in [http://rethinkdb.com/docs/introduction-to-reql/ RethinkDB];
* [[Smiles arbitrary target specification|SMARTS]] is the [[cheminformatics]] standard for a [[substructure search]];
* [[Smiles arbitrary target specification|SMARTS]] is the [[cheminformatics]] standard for a [[substructure search]];
* [[SPARQL]] is a query language for [[Resource Description Framework|RDF]] [[Graph (discrete mathematics)|graphs]];
* [[SPARQL]] is a query language for [[Resource Description Framework|RDF]] [[Graph (discrete mathematics)|graphs]];
* [[SPL (Search Processing Language)|SPL]] is a search language for machine-generated [[big data]], based upon Unix Piping and SQL.
* SCL is the Software Control Language to query and manipulate [[Endevor]] objects
* [[SQL]] is a well known query language and [[data manipulation language]] for [[relational database]]s;
* [[SQL]] is a well known query language and [[data manipulation language]] for [[relational database]]s;
* [[SuprTool]] is a proprietary query language for SuprTool, a database access program used for accessing data in ''Image/SQL'' (formerly [[TurboIMAGE]]) and Oracle databases;
* [[TMQL]] Topic Map Query Language is a query language for [[Topic Maps]];
* TQL is a language used to [http://cmshelpcenter.saas.hp.com/CMS/10.21/ucmdb-docs/docs/eng/doc_lib/Content/modeling/Tql_c_Overview.htm query topology for HP products]
* [[D (data language specification)|Tutorial D]] is a query language for [[Relational database management system|truly relational database management systems]] (TRDBMS);
* [http://usql.io/ U-SQL] is a data processing language invented at Microsoft
* [[XQuery]] is a query language for [[XML database|XML data sources]];
* [[XQuery]] is a query language for [[XML database|XML data sources]];
* [[XPath]] is a declarative language for navigating XML documents;
* [[XPath]] is a declarative language for navigating XML documents;
* [[XSPARQL]] is an integrated query language combining XQuery with SPARQL to query both XML and RDF data sources at once;
* [[Yahoo! Query Language|YQL]] is an [[SQL]]-like query language created by [[Yahoo!]]
* [[Yahoo! Query Language|YQL]] is an [[SQL]]-like query language created by [[Yahoo!]]
* Search engine query languages, e.g., as used by [[Google Search|Google]]<ref>
* Search engine query languages, e.g., as used by [[Google Search|Google]]<ref>
Line 79: Line 65:
{{cite web
{{cite web
| title = Bing Query Language
| title = Bing Query Language
| date = 22 June 2010
| url = https://msdn.microsoft.com/en-us/library/ff795667.aspx
| url = https://msdn.microsoft.com/en-us/library/ff795667.aspx
| access-date = August 22, 2015
| access-date = August 22, 2015
Line 88: Line 75:
* [[Data definition language]]
* [[Data definition language]]
* [[Data manipulation language]]
* [[Data manipulation language]]
* [[Path expression]]


== References ==
== References ==
Line 103: Line 91:
[[Category:Data management]]
[[Category:Data management]]
[[Category:Programming language classification]]
[[Category:Programming language classification]]

[[no:Database#Spørrespråk]]

Revision as of 07:00, 8 April 2024

A query language, also known as data query language or database query language (DQL), is a computer language used to make queries in databases and information systems. In database systems, query languages rely on strict theory to retrieve information.[1] A well known example is the Structured Query Language (SQL).

Types

Broadly, query languages can be classified according to whether they are database query languages or information retrieval query languages. The difference is that a database query language attempts to give factual answers to factual questions, while an information retrieval query language attempts to find documents containing information that is relevant to an area of inquiry. Other types of query languages include:

  • Full-text. The simplest query language is treating all terms as bag of words that are to be matched with the postings in the inverted index and where subsequently ranking models are applied to retrieve the most relevant documents. Only tokens are defined in the CFG. Web search engines often use this approach.
  • Boolean. A query language that also supports the use of the Boolean operators AND, OR, NOT.
  • Structured. A language that supports searching within (a combination of) fields when a document is structured and has been indexed using its document structure.
  • Natural language. A query language that supports natural language by parsing the natural language query to a form that can be best used to retrieve relevant documents, for example with Question answering systems or conversational search.

Examples

See also

References

  1. ^ Schmitt, Ingo (January 2008). "QQL: A DB&IR Query Language". The VDLB Journal 17. 17: 39–56. doi:10.1007/s00778-007-0070-1. S2CID 207032530 – via ACM Digital Library.
  2. ^ Norbert E. Fuchs; Kaarel Kaljurand; Gerold Schneider (2006). "Attempto Controlled English Meets the Challenges of Knowledge Representation, Reasoning, Interoperability and User Interfaces" (PDF). FLAIRS 2006.
  3. ^ "FQL Overview". Facebook Developers. Archived from the original on 2013-12-18. Retrieved 2013-12-11.
  4. ^ http://gellish.wiki.sourceforge.net/Querying+a+Gellish+English+database[permanent dead link]
  5. ^ "Search operators". Google Inc. Retrieved August 22, 2015.
  6. ^ "Bing Query Language". Microsoft. 22 June 2010. Retrieved August 22, 2015.