Go BackSQL: Database Maintenance

Synopsis
SQL: Database Maintenance describes how to use SQL to create, modify and delete information within databases.

Audience
This course is designed for data processing and business professionals who want to use SQL to maintain their databases.

Time
4 - 7 hours

Product Code: SQL111
After completing this course, the student should be able to create, modify and delete with SQL statements the following items within a  relational database:
 
Table
Table views
Databases
Storage groups
Table spaces
Indexes
Index spaces

SQL Overview
Presents an overview of concepts pertaining to relational databases and SQL.  Describes the tables used in the course.
 
Relational Concepts
Databases based on a relational model.  Components of relational tables.
Course Tables
Data found in the tables used in the course.
SQL Concepts
Purpose of SQL.  Identification of the features of Data Definition Language, Data Manipulation Language and Authorization Language.


Tables
Describes how to create and maintain tables within relational databases.
 
Table Design Fundamentals
Explanation of how relationships are established between relational tables.  Definition of primary and foreign keys.
The CREATE Statement
Purpose and format of the CREATE statement.  Explanation of the use and features of character, numeric and date/time data types.
Inserting Rows
Purpose and format of the INSERT statement.  Using and omitting column names when inserting data.  Inserting numeric and character data into tables. Identification of the references enforced on tables involved in a referential constraint.  Inserting dates and times into tables.
Updating and Deleting Rows
Purpose and format of UPDATE and DELETE statements.  Effects of updating and deleting in parent and dependent tables.
Maintaining and Using Tables
Purpose and format of the GRANT, REVOKE, ALTER, and DROP statements.  Creating synonyms for tables.


Other Database Objects
Describes how to create and maintain table views, databases, storage groups, table spaces, indexes and index spaces within relational databases.  Discusses the system catalog.
 
Table Views
Definition of a table view and explanation of when a view cannot be updated.  Using CREATE VIEW and SELECT statements to define a view.  How to update a table view.
Objects for Storing Tables
Purpose and use of the following objects in a relational database: database, storage group and table space.
Databases and Storage Groups
Purpose and format of the following SQL statements: CREATE DATABASE, ALTER DATABASE, CREATE STOGROUP, ALTER STOGROUP, DROP DATABASE and DROP STOGROUP.
Table Spaces
Purpose and format of the following SQL statements: CREATE TABLESPACE, ALTER TABLESPACE and DROP TABLESPACE.  How to create partitioned table spaces.
Indexes and Index Spaces
Purpose and use of indexes and index spaces.  Purpose and format of the CREATE INDEX statement.  How to create index spaces.
The System Catalog
Purpose and use of the system catalog.  How to access data in the system catalog.  Similarities and differences in the system catalog in DB2 and SQL/DS.


 

Go Back