SQL objects
SQL objects are
schemas, journals, catalogs, tables, aliases, views, indexes, constraints,
triggers, sequences, stored procedures, user-defined functions, user-defined
types, global variables, and SQL packages. SQL creates and maintains
these objects as system objects.
- Schemas
A schema provides a logical grouping of SQL objects. A schema consists of a library, a journal, a journal receiver, a catalog, and, optionally, a data dictionary. - Journals and journal receivers
A journal and a journal receiver are used to record changes to tables and views in the database. - Catalogs
An SQL catalog is a collection
of tables and views that describe tables, views, indexes, procedures,
functions, sequences, triggers, variables, constraints, programs,
packages, and XSR objects.
- Tables, rows, and columns
A table is a two-dimensional arrangement of data that consists of rows and columns. - Aliases
An alias is an alternate name for a table or view. - Views
A view appears like a table to an application program. However, a view contains no data and only logically represents one or more tables over which it is created. - Indexes
An SQL index is a subset of the data in the columns of a table that are logically arranged in either ascending or descending order. - Constraints
A constraint is a rule enforced by the database manager to limit the values that can be inserted, deleted, or updated in a table. - Triggers
A trigger is a set of actions that runs automatically whenever a specified event occurs to a specified table or view. - Stored procedures
A stored procedure is a program that can be called with the SQL CALL statement. - Sequences
A sequence is a data area object that provides a quick and easy way of generating unique numbers. - Global variables
A global variable is a named variable that can be created, accessed, and modified using SQL. - User-defined functions
A user-defined function is a program that can be called like any built-in functions. - User-defined types
A user-defined type is a data type that you can define independently of the data types that are provided by the database management system. - XSR objects
An XSR object is one or more XML schema documents that have been registered in the XML schema repository with the same name. - SQL packages
An SQL package is an object that contains the control structure produced when the SQL statements in an application program are bound to a remote relational database management system (DBMS).
Parent topic: Introduction to DB2 for i Structured Query Language