In general the user may enter different kinds of OSQL statements to the sa.engine REPL 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.
This section is organized as follows:
Before going into the details of the different kinds of OSQL statements, in basic constructs the basic building blocks of the query language are described.
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 Queries.
Regular queries return unordered sets of data. In addition sa.engine provides the ability to specify vector queries, which return ordered sequences of data, as described in Vector Queries.
A central concept in sa.engine 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 Defining Functions.
Updates describes how to update a populated database.