Google News
logo
ArangoDB - Interview Questions
What is AQL in ArangoDB?
AQL stands for ArangoDB Query Language. It is a declarative query language used to interact with ArangoDB databases. AQL is similar to SQL (Structured Query Language) in syntax but is specifically designed to work with ArangoDB's multi-model data capabilities, including document, graph, and key-value data.

Key features of AQL include :

Data Retrieval : AQL allows you to retrieve data from collections, graphs, and views using SELECT statements. You can specify filtering criteria, sorting options, and projection of specific fields in the result set.

Data Manipulation : AQL supports INSERT, UPDATE, and DELETE statements for modifying data in collections. You can insert new documents, update existing documents, or delete documents based on specified conditions.

Graph Traversal : AQL provides graph traversal capabilities for navigating relationships between vertices and edges in a graph. You can perform graph traversals to find paths, neighbors, and connected components within a graph.

Joins and Aggregations : AQL supports joins between collections and graphs, allowing you to combine data from multiple sources in a single query. You can also perform aggregations, such as counting, summing, averaging, and grouping, to analyze data.

Full-Text Search : AQL includes support for full-text search using the SEARCH keyword. You can search for text within documents, specifying search terms, filters, and scoring options.

Transactions : AQL supports ACID transactions, allowing you to group multiple AQL statements into a single transaction for atomicity, consistency, isolation, and durability.

Here's a simple example of an AQL query :
FOR doc IN myCollection
    FILTER doc.status == 'active'
    RETURN doc?

This query retrieves all documents from the collection "myCollection" where the value of the "status" attribute is 'active'.
Advertisement