Simple table space
-----------------------
In the early days of DB2 on the mainframe, there were only two types of table spaces; simple was one of them. You could put multiple tables into the simple table space, but there was no way to automatically segregate the rows of one table from the rows of another. Therefore, rows of two (or more) tables could be interleaved on a single page. When DB2 used a table-space scan to access the rows of one table, it actually had to read all of the rows of every table in the space. Maintaining the cluster order of the tables was difficult, if not impossible. Even if there was only one table in the table space, the performance wasn't as good as it could be for inserts or mass deletes. IBM recommends that you no longer use simple table spaces.
Segmented table space
----------------------------
DB2 V2R1 introduced a smarter type of table space. Today, a new parameter (SEGSIZE) allows the DBA to allocate a second type of table space, one with pages grouped by segment. And one segment can only belong to one table. A table-space scan can now identify, at the segment level, which segments to scan; a table-space scan is actually a table scan. Oddly enough, even if there's only one table in the table space, the segmented table space is better because the information needed for insert logic is twice as robust. Also, rows can be mass deleted by merely maintaining entries in a space-map page rather than accessing, locking, and logging the maintenance of each individual page and row. And there are other benefits of the segmented table space; for example, the image copy utility recognizes which pages are active and which are not, and only backs up the active ones.
Partitioned table space
--------------------------
The other type of table space that has been around from the beginning is the partitioned table space. Because DB2 datasets are really VSAM files and because the maximum size of a VSAM file allocation back in those days was 4GB, there needed to be a style of table space that could control more than one allocation gracefully. The partitioned table space allows the DBA to control the fragmentation of data when the table size exceeds 4GB.
In our analogy, the three table-space types represent the architectural concepts of the types of houses we are going to build in Happy Acres: basic ranch-style houses, three-story colonials, and condominiums with multiple towers. In other words, we have three basic architectural drawings and, with minor modifications to each, we can build many unique structures in our new subdivision.