Rows and cells

Each row in a decision table forms a rule.

Each numbered row in a table forms a rule. The values in the cells of the row contain the conditions and actions of the rule:

  Grade Loan Insurance
Min Max Rate Required
1 A 100,000 300,000 0,001 true

To make rows in a decision table easier to read, you can merge cells with conditions that are common to more than one rule. In the following table, the Grade A cells of rows 1 and 2 have been merged into one cell:

  Grade Loan
Min Max
1 A 100,000 300,000
2 300,000 600,000

You read the two rules as follows:

  • Rule 1

    if
       all of the following conditions are true:
          - Grade is A
          - the amount of Loan is between 100,000 and 300,000,
    then...
  • Rule 2

    if
       all of the following conditions are true:
          - Grade is A
          - the amount of Loan is between 300,000 and 600,000,
    then...

If a third row is added to the decision table, it can be shown in the following ways:

  • It can have a different value for the first condition:

      Grade Loan
    Min Max
    1 A 100,000 300,000
    2 300,000 600,000
    3 B 600,000 900,000
  • It can share the value for the first condition:

      Grade Loan
    Min Max
    1 A 100,000 300,000
    2 300,000 600,000
    3 600,000 900,000

Merged or split cells

In condition columns, you can merge or split the cells in subcolumns and change the operator. For example, the third row in the following table is also about Age, but it includes the operator foris more than, which takes only one value, instead of is between, which requires two values:

  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 Loan column.

  Grade Loan Insurance
Min Max Rate Required
1 A <100,000   false
2 100,000 300,000 0.001 true
3 300,000 600,000 0.003 true
4 ≥600,000 0.005 true
5 B <100,000   false
6 100,000 300,000 0.0025 true
7 300,000 600,000 0.005 true
8 600,000 800,000    
9 ≥600,000 0.0075 true

Each numbered row in the table still forms a rule. Partitioning helps you compare rules with similar conditions, and find overlaps and gaps between values of the rules.

Empty cells

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

In the following table, the first rule does not set an insurance rate.

  Grade Loan Insurance
Min Max Rate Required
1 A <100,000   false
2 100,000 300,000 0.001 true
3 300,000 600,000 0.003 true
4 ≥600,000 0.005 true