DJILLALI LIABES University
Computer Science Departement
Sidi Bel Abbes
Algeria
LECTURE N°3:
Information Encoding
Classroom Code :
ue63a6q
[Link]
Objectives
• Understanding the concept of coding
• Types of coding
[Link] coding
2. Block coding
3. Articulated coding
4. Level coding
• Information control
Introduction
• When analyzing an application, large amounts of data must
be carefully organized for efficient computer processing.
Although computers can handle vast information quickly
and securely, this advantage depends on proper data
structuring.
• As data volume increases, a key challenge is ensuring clear
and unique identification of each object.
Definitions and Examples
• Consider student information: it's often possible to find
two or more students with the same first and last name.
It would be impossible to distinguish them if we only
relied on their name for identification. The best
solution seems to be assigning them codes. The
process of assigning codes is called "codification."
• Definition 1: Codification is an optimization process
that replaces naturally formatted information with a
conventional symbol (code) better suited for the user's
objectives and for automatic processing.
Définition of code
• A code is a conventional, generally
abbreviated, representation of an object.
• Example: Assign codes to different
students:
University entry year + sequential number
e.g, 202500154.
Encoding
• To be processed by the computer, information needs
to be structured. This structuring necessarily
involves the association of codes with the different
information and concepts manipulated by the
information system.
• These codes will make it possible to designate each
piece of information in a clear and unique way.
INFORMATION SOURCES:
In any organization, information comes from different
sources
- Internal: management reports, accounting and
financial documents, memo, social documents.
- External: on the other hand, come from outside,
such as the media, specialized documents (technical
sheets), public organizations (administrations,
ministries),
Codification
• Coding is a very delicate operation because
“poorly designed code” is a source of
delays and errors. For this we aim for the
following objectives:
Main characteristics of a coding1/3
• Non-ambiguity: a codification is unambiguous if it
associates with each object one and only one code, and with
each code one and only one object (Bijection between the set
of codes and the set of objects).
Dénomination Codification
Polysémes
Synonymous .
Set of words in natural Set of conventional
language Set of objects to
represent symbols
Main characteristics of a
coding system: 2/3
• Ease of use: the code should be simple to apply and
understand.( This includes conciseness, ease of control,
and ease of exploitation)
• Possibility of extension and insertion: it must allow
future additions or modifications without losing
consistency.
• Conciseness: the purpose of coding is to avoid handling
overly long information. An effective code should
therefore be expressed with as few characters as
possible..
Main characteristics of a coding 3/3
• Security: codes should minimize the risk of errors and
ensure reliable identification.
• Efficiency (space and time saving): coding reduces
storage needs and accelerates data processing.
• Control of information format: codes referring to
objects of the same category must follow a consistent
structure. For instance, if all customers are represented by
4-digit codes, any code with 5 or 6 digits can be
immediately identified as erroneous.
• Mnemonic value: codes should be meaningful and
facilitate memorization. Reading the code should naturally
evoke the object it represents. For example, NumStud can
be used to designate a student number.
The different types of coding
1- Sequential coding: this method consists of assigning
consecutive numbers to the objects being coded (e.g., 001, 002,
003, …). It is a simple and systematic approach that ensures
uniqueness and facilitates ordering.
Advantages:
• Unambiguous
• Simple to implement
• Extension possible
Disadvantages:
• Unable to insert
• Not significant
• No groupings possible
2- Coding by slices( Block ,categories)
Coding by slices: this method consists of reserving predefined
ranges of codes for specific categories of objects. Within each range,
coding is usually sequential. For example, in a library management
system:
N°: 001→200 : Medicine books .
N°: 201→300 : Computer Science books.
N° :301→ 400 : Biology books.
N° : 401→500 : Phylosophy books
No 501→600 : Law books.
This approach facilitates classification and makes it easier to identify
the category of an object directly from its code.
3- Articulated coding
Articulated coding: in this method, each code is divided
into distinct sections called descriptors, with each descriptor
carrying a specific meaning. This structure enables the code
to convey multiple levels of information simultaneously.
Exemple : Vehicle registration code
[Link] coding
• Advantages of articulated coding:
• Unambiguous: each descriptor has a clear and precise meaning.
• Grouping: allows objects to be classified and grouped according to
predefined criteria.
• Wide use: this type of coding is widely applied in various domains.
• Control: facilitates error detection by verifying the coherence of
descriptors.
• Disadvantages of articulated coding:
• Length: codes may become too long, making them heavy to handle.
• Saturation: there is a risk of descriptor exhaustion when the allocated
range is fully used.
• Instability: if one descriptor changes, the entire code must be
modified, which reduces flexibility.
4- La codification by Level
(Hierarchical Codification)
• Coding by levels: this is a particular case of articulated coding in
which the descriptors represent hierarchical levels. Each level adds
a layer of precision and detail.
•
Example: in the classification of a book’s content:
• Level 1: Chapter
• Level 2: Section
• Level 3: Subsection
• Level 4: Paragraph
• This approach ensures a structured, hierarchical representation of
information.(Chapter, section, subsection, etc.)
Mnemonic Codification
• This involves abbreviating the name of an object
using a reduced set of characters that evoke the
coded object. There are two types:
• Consonant Codes: Created by removing vowels,
e.g., "FACTURE" becomes "FCTR."
• Abbreviative Codes: Created by abbreviating the
object's name, e.g., "FACTURE" becomes "FACT."
Example:
Consider the following document
Example:
Order Number Ord_Num Order date Ord_Dat
Client Number C_Num Client name C_Name
The Client Number data designated by C_Num.
Information Control
• The goal of an information system is to provide users
with correct and reliable information.
To ensure this, the information must be checked and
verified.
• Definition: Checking that the information is accurate
and matches what it should be.
• Control of an information system includes checking
data, processes, and results..
• Controls can be manual or automatic.
Main Types of Controls
There are two main types of controls:
• Direct controls: These relate to the information
itself and its characteristics, independently of any
other information.
• Indirect controls: These determine the accuracy of
information by comparing it with other pieces of
information.
Information Control
• Direct Control:
• a-Presence Control: It involves checking that
the information is actually present on the
medium where it is supposed to appear.
• Example: student file: if name does not exist,
error.
• Note: conditional presence control.
Information Control
• b-Type Control:
• It involves checking the numerical or alphabetical
type of a piece of information based on its meaning.
• Example:
• Phone number = 2AB356 error
• Phone number = 03503582395 error
• Since the control does not flag an error, one can, for
example, add a control on the length: of digits = 10.
• c- Alignment Control (or Formatting Control):
It consists of checking the position of a piece of
information within its entry field. By convention:
• Numerical ⇒ right alignment (e.g., 1 3)
• Alphabetical ⇒ left alignment (e.g., A B)
• Note: This control is generally ensured
automatically by the software.
indirect Contrôl
• a-Internal Consistency Control: This is the
verification of the accuracy of a part of a
data item relative to the other parts of the
same data item. It is mainly used for data
with articulated coding (structured data).
• Example: 31/02/1999⇒ error because Day
=31 is incompatible with Month =‘‘02"
(February).
Contrôle indirect :
b-External Consistency Control:
It consists of checking the accuracy of a data value relative to
other data (i.e., data that is separate from it), whether those other
data are in the same file or in another file.
Example: Student Record
N Name Date of Birth Enrollment Date
1 A 1999 1998
Error: Date of birth is (A person cannot be born after they
enroll).
Note:
The current year is often used in external consistency control.
Order of execution of controls:
1. Presence Control
2. Type Control
3. Alignment Control (or Formatting
Control)
4. Internal Consistency Control
5. External Consistency Control
How to choose a coding system?
• To choose the best coding system, ask three
questions:
• How will it be used? (Purpose)
• How much data is there? (Volume)
• Will the data grow or change? (Future-
proof/Scalability)
• Getting these right makes your coding work well
and last long.
Conclusion
• When creating a coding system, it is essential to
consult the users. They know best the objects to
be coded and how the codes will be used in
practice. Their participation guarantees that the
codification will be useful, clear, and
adapted to real needs.