HPlogo ALLBASE/SQL Database Administration Guide: HP 3000 MPE/iX Computer Systems > Chapter 5 Database Creation and Security

Creating a Database Schema

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

A database is a collection of tables, views, indexes, procedures, and rules which have the same owner. A schema consists of the owner name, also called the authorization name, and the following statements, as needed, to define your database:

  • CREATE TABLE

  • CREATE VIEW

  • CREATE INDEX

  • CREATE PROCEDURE

  • CREATE RULE

  • CREATE GROUP

  • ADD TO GROUP

  • GRANT

You can define a database by either creating individual objects or using the CREATE SCHEMA statement to group the definitions within one statement. This statement allows forward and circular reference on referential integrity constraints. You can define the database within a statement so that database creation is atomic, that is, the database is either complete or nothing is created.

The appropriate system catalog views, such as SYSTEM.TABLE, SYSTEM.VIEWDEF, SYSTEM.TABAUTH, are updated to reflect the schema you have defined. After creating the schema, you can add, modify, or drop tables, and grant or revoke authorities as necessary.

Feedback to webmaster