Table space
The storage structure in DB2 for z/OS that holds the data of one or more tables, kept in VSAM datasets that DB2 manages.
Also written tablespace, universal table space, UTS, partition-by-growth, partition-by-range, index space
A table space is where DB2 for z/OS keeps table data. A table is what SQL sees: rows and columns. A table space is the storage behind it: one or more VSAM datasets that DB2 creates and manages.
Modern DB2 uses universal table spaces, which come in two kinds. Partition-by-growth adds new partitions as the table grows. Partition-by-range splits the data by key values, such as one partition for each month, so that large tables can be managed in pieces. Older table space types still exist at many sites.
Indexes have their own storage, called index spaces. In DB2 for z/OS, a database is a group of table spaces and index spaces, used to organise and control them together.
Table spaces matter most for maintenance. Backups, reorganisation and recovery are done on table spaces. A table space can also be put into a restricted state, such as needing a backup or a recovery, and then programs cannot use the tables in it until the problem is fixed.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- DB2 for z/OSIBM's relational database on the mainframe, where a great deal of the world's banking and insurance data is stored.
- IndexA structure that lets a database find rows by value without reading the whole table.
- VSAMA family of dataset types built for fast record access by key, used where applications need to look records up rather than read them in order.
- DB2 utilitiesThe batch programs that load, back up, reorganise and check DB2 for z/OS data, run as jobs outside normal SQL.
- SQLThe language used to query and change relational data. The same SQL used everywhere else, running against mainframe tables.