LearnWave
Learn it. Master it.

Overview of Computerised Accounting System

Designing a coding structure

Build a code that tells its own story.

Before any codes are given, a coding structure must be designed. First identify the hierarchy (which level sits inside which), then the attributes to be coded at each level.

The book's example is a trust that runs schools. The levels are: Trust, School, Entry-year, Stream, Class, Section, Student. There is only one trust, so no digit is needed for it.

For each level, count the largest value it could ever need, and give it enough digits:

  • School: 2 digits (up to 99 schools).
  • Entry-year: 2 digits (08 for 2008).
  • Stream: 1 digit (0 where a stream does not apply).
  • Class: 2 digits (up to 12).
  • Section: 1 digit (up to 9 sections: A = 1, B = 2...).
  • Student: 2 digits (up to 99 in a section).

That makes 10 digits in all. Roll no. 54 in Section B of Class XII, who entered in 2008 in the science (non-biology) stream, stream 1, in the 6th school, gets 06 08 1 12 2 54.

A good code tells its own story. From this one number you can read the school, entry year, stream, class and section, and you can list, for example, every student who entered a given school in a given year.

Count the largest value at each level, then give it enough digits.

Practise this lesson

Questions that get harder as you improve, a Tutor that helps without giving the answer away, and progress you can see. Free for every learner.

No account, no email address. Opens the real product.