Rows and cells

Each row in a decision table corresponds to a rule.

  Grade Amount of loan Insurance required Insurance rate
Min Max
1 A 100,000 300,000 true 0.001

To make the rows of decision tables more intuitive to read, cells that are shared by more than one rule are merged.

  Grade Amount of loan
Min Max
1 A 100,000 300,000
2 300,000 600,000

In this table, each row corresponds to a rule, and they share a condition.

A third row added to this decision table can either:

Also, you can add an Otherwise row to take into account the case where none of the other possibilities for that condition are correct.

Merged or split cells

In condition columns, you can merge or split the cells under subcolumns and change the operator. For example, the third row in the following table also deals with Age, but with the operator is more than, which has one value, instead of is between, which requires two:

  Age
Min Max
1 18 25
2 26 40
3 >40

Partitioned cells

A partition is a group of cells in a condition column with a common cell next to them. In the following table, cells A and B in the Grade column each have a partition of cells in the Amount of loan column.

Partitions are important to consider when adding new rows, when sorting columns, and to understand error messages displayed in the decision table.

  Grade Amount of loan Insurance required Insurance rate
Min Max
1 A <100,000 false
2 100,000 300,000 true 0.001
3 300,000 600,000 true 0.003
4 ≥600,000 true 0.005
5 B <100,000 false  
6 100,000 300,000 true 0.0025
7 300,000 600,000 true 0.005
8 600,000 800,000    
9 ≥600,000 true 0.0075

In a decision table, each cell in the first column represents the first condition. For each of these cells, the next column contains a cell or group of cells (partition) that cover all possible values for that column. If it does not, the table might be incomplete.

Similarly, if there are additional columns, the same rule applies: the third column contains groups of cells that cover all possible values for that column.

Empty cells

A row can contain empty cells. When the empty cell is in a condition column, the condition is always satisfied. When the empty cell is in an action column, the action is ignored.

  Grade Amount of loan Insurance required Insurance rate
Min Max
1 A <100,000 false
2 100,000 300,000 true 0.001
3 300,000 600,000 true 0.003
4 ≥600,000 true 0.005

For example, the first rule in this table would not set an Insurance rate.