DB2 Storage Groups
Hierarchy of DB2 is, in DB2 at the topmost level, we have a storage group. Storage group as the name suggest is a group of storage or it is a set of volume on DASD that is set of volume on a direct access storage device. These set of volumes are VSAM dataset.
Here you can see this storage group if you consider this entire area as a storage group. Than storage groups are further divided into databases.
As you can see here is Database 11, 22, 33, 44. In one storage group, we can have multiple databases. Similarly, we can have in number storage group as well.
We have mentioned here, as DASDVOLUME12(collection of VSAM database).IN DASD you can consider database 11 and 22. We can have multiple databases; in this case, there are two databases. This is storage group 12.
Again, in DASDVOLUME34 (collection of VSAM database) we have two databases, database 33 and database 44. This is storage group 34.
DASD volumes are the collection of VSAM dataset.
What is a database?
A database is a collection of table and index.
As we can see in database11 we have TABLESPACE111 and INDEXSPACE111. In TABLESPACE111 we have TABLE A, TABLE B, TABLE C, TABLE D we have multiple tables, so it can be one or more tables and in INDEXSPACE111 we have index pointing to table these are INDEX A, INDEX B, INDEX C, INDEX D.
Similarly, if you go to DATABASE22, here we have TABLESPACE222 and INDEXSPACE 222 and in TABLESPACE222 we have TABLE I, TABLE J, TABLE K and in INDEXSPACE222 INDEX I, INDEX J. We have only two index and three tables in this TABLESPACE row.
In database33, we have TABLESPACE333 and INDEXSPACE333. IN TABLESPACE333 there are three tables TABLE E, TABLE G, TABLE H, and three INDEX, INDEX E, INDEX G,
Similarly, in database44, we have TABLESPACE444 and INDEXSPACE444. IN TABLESPACE444 there is one tables TABLE L H and one INDEX, INDEX L.
Now, in this TABLESPACE once we have created tables, based on the table we can create a view, synonym, alias. The table is divided into rows and column. We will come to know about rows and column in hierarchy of DB2 once we create a column.