DB2 V10-New Access Method~Hashing (1 of 2)

Upto 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 data bases founded upon hashing.

Image from book

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.

One thought on “DB2 V10-New Access Method~Hashing (1 of 2)

  1. Pingback: DB2V10-Temporal data System Time & Business Time | Mainframe-Srini Blogs

Have Something to Say? Post Your Comment

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s