Summary

Team-Fly    

 
DB2 Universal Database for OS/390 v7.1 Application Certification Guide
By Susan Lawson
Table of Contents
Chapter 2.  Database Objects

Summary

In this chapter, we concentrated on the SQL Data Definition Language (DDL). DDL is used to create, modify, and remove database objects. There are three main statements in DDL: CREATE, ALTER, and DROP. If you want to use a DB2 database, you may need to learn DDL first to create some database objects. There are many kinds of objects in a DB2 database.

We focused primarily on data types, tables, views, and indexes among the database objects created by DDL. A data type is used to specify the attribute of columns in a table. DB2 has two kinds of data types: built-in data types and user -defined data types. The built-in type is a DB2-supplied data type and falls into three main categories:

  • Numeric

  • String (including large objectLOB)

  • Date-time

We also discussed that DB2 supports Unicode. The user-defined data type enables you to create your application-oriented data type based on the built-in data type.

A table consists of columns and rows, and stores an unordered set of records. Each column has a data type as one of the attributes. A table itself can have some rules called constraints to guarantee the uniqueness of records or maintain the relationship between and within tables. It helps application programmers to evaluate the records or maintain the consistency between the tables. A view may also reduce some application development workload. A logical table is created and is based on the physical table or other views. A view can be created to limit access to sensitive data while allowing more general access to other data. An index is one of the most important objects for performance. It can also be used to guarantee the uniqueness of each record. We also covered some of the options in the CREATE and ALTER statements.

Finally, we looked at what authorities and privileges are required to access DB2 objects and the DCL (Data Control Language) needed to GRANT and REVOKE these privileges.


Team-Fly    
Top


DB2 Universal Database for OS. 390 v7. 1 Application Certification Guide
DB2(R) Universal Database for OS/390 V7.1 Application Certification Guide (IBM DB2 Certification Guide Series)
ISBN: 0131007718
EAN: 2147483647
Year: 2002
Pages: 163
Authors: Susan Lawson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net