WHAT IS DECLARATIVE AND PROCEDURAL KNOWLEDGE? WHAT IS DIFFERENCE BETWEEN THEM? GIVE EXAMPLE.

Rashandeep singh
2 min readDec 16, 2020

--

PROCEDURAL KNOWLEDGE:

Procedural Knowledge also known as interpretive knowledge is the type of knowledge in which it clarifies how a particular thing can be accomplished. It is not so popular because it is generally not used. It emphasizes how to do something to solve a given problem.

DECLARATIVE KNOWLEDGE:

Declarative Knowledge also known as descriptive knowledge, is the type of knowledge which tells the basic knowledge about something and it is more popular than Procedural Knowledge.
It emphasizes what to do something to solve a given problem.

DIFFERENCE BETWEEN PROCEDURAL AND DECLARATIVE KNOWLEDGE

The difference between declarative and procedural knowledge is that the former refers to unchanging, factual information and the latter refers to the collective thought processes that define how things are done.

EXAMPLE 1:

Procedural knowledge — It can include a group of logical assertions merged with a resolution theorem prover to provide an absolute program for solving problems. Here, the CTC can be thought of as a procedural knowledge as it would require a process to calculate it as given below.

Gross salary = basic salary + allowances

Benefits (vary from company to company)

CTC = gross salary + benefits

So, this is how CTC is calculated by following a lengthy process instead of just collecting facts.

Declarative knowledge — Let us understand this by the example of an employee whose ID, name, address, salary have to stored in a database where this information is fact-based does not require much effort to acquire it. It depends on only specification of results, not detailed procedure of producing them.

EXAMPLE 2:

Also, taking example of programming language, procedural programming paradigm (e.g. C language) follows the control construct. We write program as a collection of statements and procedures. Whereas in declarative programming paradigm (e.g. Prolog), we don’t write control constructs. We specify idea/knowledge and series of rules. We don’t give instructions to computer. We only specify the goal and prove things.

EXAMPLE 3:

Procedural knowledge

var a=[1, 2, 3, 4, 5];

var b=[];

for(var i=0;i<a.length;i++)

{

b.push(a[i]);

}

console.log(b);

Output is:

[1, 2, 3, 4, 5]

Declarative knowledge

var a=[1, 2, 3, 4, 5];

var b=a.map(function(number)

{

return number*1});

console.log(b);

Output is:

[1, 2, 3, 4, 5]

In both example we can see that the output of a given problem is same because the only difference in that two methods to achieve the output or solution of problem.

--

--

Rashandeep singh
Rashandeep singh

Written by Rashandeep singh

Well-versed in various programming languages like C,C++,Python and Data Structures , Web Development. Pursuing B.E. focused in CSE