Database Spaces

A database space is the storage area for your database files. After defining one or more database spaces using the utility dbdef, assign them to the product line, data area, system code, or table.

When you assign a space to a file, the data for that file is stored in the location defined by that database space.

  • If a file does not have a database space, the system stores data in the system code's database space.

  • If a system code does not have a database space, the system uses the data area's database space.

When the IBM DB2 database is running on the OS/390 platform, the Database Space name in dbdef refers to the Stogroup name. It is possible to spread the indexes of a single file across multiple indexes.

When you assign a database space to a file, the data for that file is stored in the location defined by that database space. If a file does not have a database space, the data is stored in the system code's database space. If the system code does not have a database space, the system uses the data area's database space.

Make as many different combinations of database spaces for tables and their indexes as you wish by simply defining database spaces for each permutation you need. Keep in mind that all indexes on the same table share the same tablespace in dbdef.

For more information on the dbdef utility, see the Application Development Workbench Standards manual.