AmosQL
In general the user may enter different kinds of AmosQL statements to the sa.amos top loop in order to instruct the system to do operations on the database:
First the database schema is created by defining types with associated properties.
Once the schema is defined the database can be populated by creating objects and their properties in terms of the database schema.
Once the database is populated queries may be expressed to retrieve and analyze data from the database. Queries return collections of objects, which can be both unordered sets of objects or ordered sequences of objects.
A populated database may be updated to change its contents.
Procedural functions (stored procedures) may be defined, which are AmosQL programs having side effects that may modify the database.
This section is organized as follows:
Before going into the details of the different kinds of AmosQL statements, in basic constructs the syntactic notation is introduced along with descriptions of syntax and semantics of the basic building blocks of the query language.
Defining Types describes how to create a simple database schema by defining types and properties.
Creating Objects describes how to populate the database by creating objects.
The concept of queries over a populated database is presented in the Queries section.
Regular queries return unordered sets of data. In addition sa.amos provides the ability to specify vector queries, which return ordered sequences of data, as described in Section 2.5.
A central concept in sa.amos is the extensive use of functions in database schema definitions. There are several kinds of user-defined functions supported by the system as described in Section 2.6.
Section 2.7 describes how to update a populated database.
Section 2.8 describes functions available to read/write data from/to files, such as CSV files.
Section 2.9 describes how to define scans making it possible to iterate over very large query results.