Cosmos
CTSQL. Database Access Language
CTSQL. Database Access Language
CTSQL is the database access language provided by Cosmos.
It is constituted as a superset of the standard SQL language defined by the ANSI X3H2 committee, to which additional functionality has been added to make up for the shortcomings of that definition, as well as extended features of the SQL2 and SQL3 definitions of the same committee.
Due to its functionality we can point out the existence of the following sub languages within the CTSQL structure.
Aimed at the definition and maintenance of the database structure.
Aimed at the insertion, deletion and maintenance of data in the database.
Aimed at controlling access permissions, concurrency control and database transactions.
A set of instructions dedicated to the extraction of information from the database.
CTSQL provides various integrity mechanisms grouped into two distinct classes: referential integrity and dictionary integrity.
These mechanisms achieve two fundamental objectives: on the one hand, to reduce the code to be written in the programs and, on the other hand, to increase the security of the applications built.
The implementation of bidirectional cursors in CTSQL allows scrolling up and down in query windows (over the database) constructed using the COOL WINDOW statement.
For each database, CTSQL allows the definition of a table specifying the sorting sequence.
Depending on the character set used, it indicates the position in which characters that would otherwise not be sorted correctly in the standard ASCII sequence (e.g. eñes, accented vowels, etc.) should be placed.
En la implementación de CTSQL se ha incluido la posibilidad de utilizar una VIEW para modificar las tablas base de las que ésta se deriva. Ello supone que cualquiera de estas operaciones se descompondrá en las correspondientes sobre las tablas base.
A JOIN operation defines the link between tables through one or more columns whose values satisfy a link condition.
CTSQL has a transaction handling mechanism whereby complex database update operations can be handled unitarily, ensuring that either all operations are performed or none are performed.
CTSQL also incorporates a mechanism for recovering the state of a database after a system crash.