ALLBASE/SQL Reference Manual (36216-90216)

44 Chapter1
Introduction
ALLBASE/SQL Databases
ALLBASE/SQL Databases
The largest unit in ALLBASE/SQL is the DBEnvironment, which can be seen logically as
a collection of database objects or physically as a group of files. Objects are database
structures.
Logical Concepts
Logically, the DBEnvironment is a structure which contains one or more relational
databases. In ALLBASE/SQL, a database is a set of tables, views, and other objects that
have the same owner.
The data in a relational database is organized in tables. A table is a two-dimensional
structure of columns and rows:
The Parts Table
----------------+------------------------------+----------
PARTNUMBER |PARTNAME |SALESPRICE
----------------+------------------------------+---------- _
1123-P-01 |Central Processor | 500.00 |
1133-P-01 |Communication Processor | 200.00 |- rows
1143-P-01 |Video Processor | 180.00 _|
| | |
+-----------------------+-----------------------+
|
columns
Often a table is referred to as a relation, and a row as a tuple. You can also think of a row
as a record, and a column as a field in a file, or table.
A view is a table derived by placing a “window” over one or more tables to let users or
programs view only certain data. A view derived from the Parts table shown above might
look like this:
The PartsID View
----------------+------------------------------
PARTNUMBER |PARTNAME
----------------+------------------------------
1123-P-01 |Central Processor
1133-P-01 |Communication Processor
1143-P-01 |Video Processor
The owner of a table or view can be one of the three following entities:
1. Individual as identified by the DBEUserID, which is the login name. An individual
who logs in as
WOLFGANG.ACCOUNTNAME
is known to ALLBASE/SQL as
WOLFGANG@ACCOUNTNAME.
2. Authorization group, a named collection of individuals or other groups. Wolfgang
might be part of a group named
Managers
. A group must be created explicitly by using
the CREATE GROUP statement.
3. Class, a name that identifies a user-defined abstraction, such as a department or a
function. Wolfgang might use tables owned by a class called
Marketing
. A class is