Module 1: DB2 Introduction
DB2 Versions and History
DB2 did not appear overnight. Its history starts with the relational model of 1970 and the idea that data should be stored as tables, related through keys, and designed with normalization.
The relational model is born (1970)
- In 1970, Dr. E. F. Codd developed the relational model for representing data.
- Before this, data was stored in hierarchical or network structures tied to physical pointers.
- The relational model said: store data as tables with rows and columns, and relate tables through key fields.
- Codd also originally defined normalization, the design procedure for representing data and relationships in tabular form.
DB2: Database 2
- DB2, short for Database 2, is IBM's relational database management system built on Codd's model.
- It is a full DBMS: it stores information in electronic form, makes it available for sharing by users or programs, and provides security, recovery and consistency.
- DB2 runs on IBM mainframe computers, AS/400 midrange computers and PCs, so the same relational ideas work on every platform.
How DB2 data organization matured
- Tables related through primary keys and foreign keys became the standard way to link data (for example, an invoice row pointing to its customer row).
- The normal forms gave designers a step-by-step method: 1NF removes repeating groups, 2NF removes partial key dependencies, 3NF removes transitive dependencies, and 4NF/5NF handle rarer multi-valued and interdependent cases.
- SQL settled into three families: DDL statements (CREATE, ALTER, DROP) to define objects, DML statements (SELECT, INSERT, UPDATE, DELETE) to work with data, and DCL statements (GRANT, REVOKE) for security.
- Physical organization matured with tablespaces (simple, segmented, partitioned), indexspaces, STOGROUPs for disk allocation, and bufferpools for in-memory speed.
- Views, synonyms and aliases were added so programs could see shaped or renamed versions of tables without copying data.
