AQL & AFL Query Languages
SciDB supports two query languages for accessing and analyzing data programmatically: a SQL-like Array Query Language (AQL), and an Array Functional Language (AFL) so you can use whichever fits your comfort zone. Each natively supports the following capabilities:
- Data schema definition
- Large-scale math operations embedded directly in queries
- Array data management (filter, aggregate, join, etc.)
- Parallel statistical & linear algebra (covariance, regression, PCA, etc.)
- User-defined operators (Postgres-style)
AQL: Array Query Language
AQL is a declarative language, modeled after SQL, and extended for working with array data. Here is an example of what AQL looks like.
/* a sample AQL query */
SELECT avg ( S.v1 )
FROM Simple_Array S
WHERE S.v3 = ‘Odd’
GROUP BY S.I;
For documentation about AQL and other features of SciDB, visit the downloads page on the SciDB forum.
AFL: Array Functional Language
AFL provides a more powerful functional language interface. Here is an example of the exact same query shown above, but written in AFL:
/* a sample AFL query */
aggregate( filter ( Simple_Array, v3 = ‘Odd’),
I, avg ( Simple_Array.v1 ) );
For documentation about AFL and other features of SciDB, visit the downloads page on the SciDB forum.
Analyze More, Program Less
About Paradigm4
Paradigm4 is the company behind the open source SciDB project. We develop it, support it, build enterprise extensions, and provide hands-on expertise.


