Schema Objects

<< Click to Display Table of Contents >>

Navigation:  Streaming SQL Reference Guide > Basic Building Blocks >

Schema Objects

Previous pageReturn to chapter overviewNext page

A schema is a collection of logical structures of data, or schema objects. Schema objects can be created and manipulated with SQL and include the following types of objects:

Stream

A schema object that is a but which does not store data, as a finite relation does. Instead, a stream implements a publish-subscribe protocol. It can be written to by multiple writers and read from by multiple readers. Sometimes referred to as a named stream to distinguish it from an "anonymous" stream - the results of executing a streaming query.

For more detail, see the topic CREATE STREAM in this guide.

Foreign Stream

A schema object that is a stream defined in the context of a schema and associated with a server, which itself is an instance of a foreign data wrapper to provide access within SQLstream s-Server to a flow of data either from or to an external system. For example, the Extensible Common Data Adapter supports the creation of a foreign stream that will take rows (from a local stream) and send them to a Kafka topic, network feed, file, Amazon Kinesis stream, and so on.

For more detail, see the topic CREATE FOREIGN STREAM in this guide.

Foreign Table

A schema object that records the metadata necessary for SQLstream s-Server to be able to access a table (or similar data structure) in a remote database. A Foreign Table can be used in SQL (both queries and updates) just like a local table.

For more detail, see the topic CREATE FOREIGN TABLE in this guide.

View

A schema object that is a relation that provides a reusable definition of a query. SQLstream s-Server supports views based on both streaming and non-streaming (finite) SELECT statements.

For more detail, see the topic CREATE VIEW in this guide..

Pump

A pump is a schema object (an extension of the SQL standard) that provides a continuously running INSERT INTO stream SELECT ... FROM query functionality, thereby enabling the results of a query to be continuously entered into a named stream.

For more detail, see the topic CREATE PUMP in this guide.

Functional Objects

SQLstream s-Server supports users in defining several types of routines: user-defined functions, user-defined procedures, and user-defined transforms.

User-Defined Routine

Any user-defined program object - the generic term for a user-defined function, user-defined procedure or user-defined transform.

User-Defined Function

A UDF is a user-defined routine that returns a scalar value. SQLstream s-Server allows the creation of Java or SQL functions.

For more detail, see:

The topic CREATE FUNCTION in this guide.

The topic CALL in this guide.

The topic DROP FUNCTION in this guide.

The topic The Geolocation Example in this guide.

User-Defined Procedure

A type of user-defined routine  that accepts zero or more parameters but does not return a value.

For more detail, see:

The topic CALL in this guide.

The topic CREATE PROCEDURE in this guide.

The topic DROP PROCEDURE in this guide.

User Defined Transform

A special type of user-defined routine  that accepts zero or more relations as input and returns a streaming relation as output. Also known as a UDX.

For more detail, see:

The topic CREATE FUNCTION in this guide.

The topic DROP FUNCTION in this guide.

Other types of objects are also stored in the SQLstream s-Server s-Server and can be created and manipulated with SQL but they are not contained in a schema; these are described in the topic Catalog Objects.