Up to Db2 V10, data in the db2 can be accessed by either Indexing or Scanning. The new method is called Hashing. Hashing-it is not New. It is old technology. IMS databases founded upon hashing.

Hash function is an algorithm. It converts data elements into a single integer. This number serves an index to database.
How to create table with Hash function?
CREATE TABLE DSN81010.DEPT (DEPTNO CHAR(3) NOT NULL, DEPTNAME VARCHAR(36) NOT NULL, MGRNO CHAR(6), ADMRDEPT CHAR(3) NOT NULL, LOCATION CHAR(16), PRIMARY KEY (DEPTNO) ) IN DSN8D10A.DSN8S10D ORGANIZE BY HASH UNIQUE (DEPTNO) HASH SPACE 64 M;
Hash space: It is defined area used for Hash access.
Related articles
- Inserting into DB from data in Hash and Arrays (stackoverflow.com)
- DB2 Connect-Interfacing with distributed systems (srinimf.com)
One thought
Comments are closed.