In the context of ArangoDB, there are different database shells to query data:
arangosh: The JavaScript based console
AQL: Arangodb Query Language, see http://www.arangodb.org/2012/06/20/querying-a-nosql-database-the-elegant-way
MRuby: Embedded Ruby
Although I understand the use of JavaScript and MRuby, I am not sure why I would learn, and where I would use AQL. Is there any information on this? Is the idea to POST AQL directly to the database server?
Acceptance sampling is employed when one or several of the following hold: Testing is destructive. The cost of 100% inspection is very high. 100% inspection takes too long.
AQL is highly flexible because it allows you to customize your quality tolerance for your product and for the three types of quality defects: critical, major and minor. Consumer products often use AQLs of 0, 2.5 and 4.0 for critical, major and minor defects, respectively.
100% QC inspections are usually reserved for products that have strict safety requirements and low tolerance for defects. They are usually not necessary for standard consumer-grade products.
As a manufacturer, you just have to understand your products, the market you want to sell them, and the end consumer of your products. The decision of defect tolerance lies with you. If you decide that the defect tolerance for the whole batch of your products should not be beyond 1.5%, then that is your AQL.
AQL is ArangoDB's query language. It has a lot of ways to query, filter, sort, limit and modify the result that will be returned. It should be noted that AQL only reads data.
(Update: This answer was targeting an older version of ArangoDB. Since version 2.2, the features have been expanded and data modification on the database is also possible with AQL. For more information on that, visit the documentation link at the end of the answer.)
You cannot store data to the database with AQL.
In contrast to AQL, the Javascript or MRuby can read and store data to the database. However their querying capabilities are very basic and limited, compared to the possibilities that open up with AQL.
It is possible though to send AQL queries from javascript. Within the arangosh Javascript shell you would issue an AQL query like this:
arangosh> db._query('FOR user IN example FILTER user.age > 30 RETURN user').toArray()
[
{
_id : "4538791/6308263",
_rev : "6308263",
age : 31,
name : "Musterfrau"
}
]
You can find more info on AQL here: http://www.arangodb.org/manuals/current/Aql.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With