SQL/400
DDL
SQL AN INDUSTRY STANDARD LANGUAGE
Defines and manipulates base objects
SQL/400 and DB2/400 are
implementations of AS/400
Includes Data definition language(DDL)
and data manipulation language(DML)
SQL Statements can be executed
a. Interactively
b. As embedded statements in a program
c. From a source file member using
RUNSQLSTM command.
SQL/400 objects and OS/400 objects
SQL/400 object or
element
OS/400 object
type or
element
Attribute and notes
Collection
Library(*LIB)
Contains QSQJRN Journal
QSQJRNnnn Journal reciever
12 view logical files for collection catalog
Base Table
Physical File(*FILE)
Single member
Externally described
Has keyed access path for each primary
unique and foreign key constraint
View
Logical File(*FILE)
Single member
Externally Described
No Keyed access path
Column (of a base table
or a view
Field
Row in a base table or a
view
Record
Index
Logical file(*FILE)
Catalog
Set of physical and
Single member
Externally Described
Keyed access path over one PF member