As with RDBMS tables, you create streams, tables, views, pumps, procedures, and user defined functions within a schema. In streaming SQL, as elsewhere, schemas function as namespaces. Because of the complex nature of streaming systems, it may be advantageous to create a number of small-scale schemas in s-Server instead of defining all objects under a few large-scale schemas. This lets you reuse and drop schemas as you need them.
For create_command, drop_command, set_command, and alter_command, see the corresponding topics in this guide.
oSET is also discussed at in the topic SessionManagement in the Admin Guide.
For checkpoint, savepoint, rollback, and commit commands, see Session Management in the Admin Guide.
oCHECKPOINT is also discussed in the topic Backups and Code Control in the Admin Guide.
Simple schema creation:
CREATE SCHEMA Trading;
Creating a schema and all its contents:
CREATE SCHEMA Trading
DESCRIPTION 'Contains the equity trades application objects';
SET SCHEMA '"Trading"';
CREATE STREAM "TRADES" (
"Ticker" VARCHAR(5) NOT NULL,
"Shares" INTEGER ,
"Price" DECIMAL(6,2) );
•The AUTHORIZATION clause is currently parsed but ignored.
•To set the path, e.g., for lookup of user-defined functions and procedures, see subtopic SET PATH in the topic SET statements in this guide.