Introduction
The purpose of codes is to make the task easy for identification and retrieval of items of information.
Codes necessary because:
- Data is easily identified
- Data is simplified and standardized. Hence the number of mistakes is reduced to being the extent possible
- Data processing operations can be done easily
- It helps to make the computer system work more efficiently
Principles of code design
- Uniqueness (E.g. University exam seat number)
- Compactness: The length of the code should be as minimum as possible (E.g. M and F can be used for males and females respectively)
- Uniformity (E.g. Employee code must start with EMP)
- Expansibility (code structure should allow growth)
- Simplicity: Code should be simple enough to use and easy to understand
- Versatility: It should be easy to modify to reflect necessary changes in conditions, characteristics, and relationships of the encoded entities.
- Clarification : Data must be sorted and collated(gathered)
- Stability: Codes should not be updated or modified frequently.
- Meaningfulness: Code values should reflect the characteristics of the encoded entities.
Types of code
Significant codes:
- Digits or letters may describe a measurable or identifiable characteristic of the item. E.g. For coding electric bulbs for inventory purposes, the following coding may be used.
- Product classification: it may be classified as automobile, domestic use, or clinical use, they can be given code as A, D or C respectively.
- Color: Bulbs can be given color as 1 for colorless, 2 for milky, 3 for yellow, 4 for red, and 5 for green, etc.
- Wattage: 5 digit code can be given to different types of bulbs like for 25W bulb 00025, for 40W 00040, for 10000W 10000, etc.
Logical codes:
It can be defined on two ways :
- Check digit code: used to check transposition and transcription E.g. 54786 is entered as 54789 or 54768
- Matrix code: it is useful in the coding relationships between two entities. ▪ E.g.

Collating codes
1. Alphabetic code:
E.g. Student names are stored with first name, middle name and last name. while assigning exam seat numbers, data are sorted in last name which changes the sequence of data,
2. Hierarchical code :
- Every item is factored into groups, subgroups and so forth.
- E.g. Salesman code can be grouped into region wise (western, eastern, northern, central, etc.), then group wise (in city there may be more than one group exist) and then sales man no like WS03001
3. Classification code :
- Decimal code: widely used in library.
- E.g. each subject is given codes like computer – 001, chemistry – 002 and so on. In the subject of computer again sub codes are given like OOPS – 001.003, RDBMS – 001.004 and so on.
- Faceted code: E.g., footwear manufacturer code may have its facets.
- Type – shoes – SH, Chappals – CH
- Gender – Male or Female
- Size – 1 to 10
- Style – any three digit code
- Material – PLA, LEH, RUB, SYN
Chronological codes:
The code is assigned in the order of event so that each code has a higher value that the last code assigned.
Many time coding may be done by taking abbreviation of the entity.
- Mnemonic codes: E.g. MCA – Master of Computer Application
- Acronym codes: E.g. COBOL – Common Business Oriented Language
- EX: Prepare the student list of names according to date of birth starting the code with earliest born.
Non significant codes:
They are of two types:
1. Sequential codes (Serial):
It is either number or letters assigned in a sequence. E.g.: For saving account in the bank, the numbering of the pass books is done sequentially. The code value has no significance in itself but does uniquely identify the entity.
Block code are serial codes only but divided into blocks which classify item into specific classes.
E.g. Steel pipe: 0001 to 0170, steel plates: 0171 to 0340, etc.
2. Random codes:
It is used in case where security is needed. It is not often used.
Points to note in Code Design
- Hyphens, commas, wide characters should be avoided in a code
- Code should not be lengthy
- Coding should enable fact processing by computer