World Library  
Flag as Inappropriate
Email this Article

.ql

Article Id: WHEBN0011537140
Reproduction Date:

Title: .ql  
Author: World Heritage Encyclopedia
Language: English
Subject: Query language, SQL, ISBL, Molecular Query Language, Object Constraint Language
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

.ql

.QL
Paradigm(s) multi-paradigm, logic-paradigm, object-oriented-paradigm
Developer Semmle
Appeared in 2007
Typing discipline static, strong
Major implementations SemmleCode
Influenced by Datalog

.QL (pronounced "dot-cue-el") is an object-oriented query language used to retrieve data from relational database management systems. It is reminiscent of the standard query language SQL and the object-oriented programming language Java. .QL is an object-oriented variant of a logical query language called Datalog. Hierarchical data can therefore be naturally queried in .QL in a recursive manner.

Queries written in .QL are optimised, compiled into SQL and can then be executed on any major relational database management system. .QL query language is being used in SemmleCode to query a relational representation of Java programs.

.QL is developed at Semmle Limited and is based on the company's proprietary technology.

Language Features

.QL has several language features to make queries concise, intuitive and reusable:

  • Extensible type hierarchy
  • Methods and predicates
  • Definition before use

Example query

The sample query below illustrates use of .QL to query a Java program. This is how one would select all classes that contain more than ten public methods:

from Class c, int numofm
where numofm = count(Method m| m.getDeclaringType()=c 
                     and m.hasModifier("public"))
      and numofm > 10
select c.getPackage(), c, numofm

In fact, this query selects not only all classes with more than ten public methods, but also their corresponding packages and the number of methods each class has.

See also

References

  • Hervé Gallaire and Jack Minker. Logic and Databases. Plenum Press, New York,1978.
  • Serge Abiteboul and Paris C. Kanellakis. Object identity as a query language primitive. In SIGMOD Rec, pages 159–173, ACM Press, 1989.
  • Oege de Moor, Elnar Hajiyev and Mathieu Verbaere. Object-oriented queries over software systems. In Proceedings of the 2007 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation (PEPM), page 91, ACM Press, 2007.

External links

  • Semmle Limited creators of .QL
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 



Copyright © World Library Foundation. All rights reserved. eBooks from Hawaii eBook Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.