HPlogo ALLBASE/SQL Reference Manual: HP 9000 Computer Systems > Chapter 2 Using ALLBASE/SQL

Creating Physical Storage

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

To create physical storage, you use data definition statements to create the following storage areas:

  • DBEFileSets

  • DBEFiles

  • TempSpace

File space for tables and indexes is managed by adding and dropping DBEFiles from DBEFileSets. DBEFiles are units of physical storage and DBEFileSets are logical collections of DBEFiles. You use the CREATE DBEFILESET statement to define a DBEFileSet, and the CREATE DBEFILE statement to define DBEFiles. You associate physical storage with the DBEFileSet by associating DBEFiles with it, using the ADD DBEFILE statement.

   CREATE DBEFILESET WarehFS
   CREATE DBEFILE WarehD1 WITH PAGES = 50, NAME = 'WarehD1'
   ADD DBEFILE WarehD1 TO DBEFILESET WarehFS

Once you have created DBEFileSets and added DBEFiles to them, you need to specify the name of a DBEFileSet in your table creation statements. This then defines, for that table, the physical files that will be used to store the data. For complete details about creating DBEFiles and DBEFileSets, refer to the ALLBASE/SQL Database Administration Guide.

TempSpace can be optionally defined and is a specific area of storage used by the system for performing sorts in the database. TempSpaces are created and dropped by using the CREATE TEMPSPACE and DROP TEMPSPACE statements. Temporary files are allocated under the available TempSpaces as they are needed for performing a sort, and deallocated once the sort is completed. TempSpace information is accessible through the system catalog view SYSTEM.TEMPSPACE. A TempSpace is referred to by a unique name. If a TempSpace is not defined, sorting is done in the /tmp directory.

Feedback to webmaster