Decision Table
Definition
A Decision Table is a tabular method used to represent complex conditional logic — listing all possible combinations of conditions and the corresponding actions to take for each combination, ensuring no logic branch is missed.
Structure of a Decision Table
| Rule 1 | Rule 2 | Rule 3 | Rule 4 | |
|---|---|---|---|---|
| Conditions | ||||
| Condition 1 | Y | Y | N | N |
| Condition 2 | Y | N | Y | N |
| Actions | ||||
| Action 1 | X | X | ||
| Action 2 | X | X |
- Condition stub / entries (top half): all relevant conditions and their possible values (Y/N or specific values)
- Action stub / entries (bottom half): the resulting action(s) for each combination (marked with X if it applies)
- Each column = one rule representing a unique combination of conditions
Example: Loan Approval Decision Table
| Condition | Rule 1 | Rule 2 | Rule 3 | Rule 4 |
|---|---|---|---|---|
| Good Credit Score? | Y | Y | N | N |
| Stable Income? | Y | N | Y | N |
| Action: Approve Loan | X | |||
| Action: Approve with Conditions | X | X | ||
| Action: Reject Loan | X |
Advantages
- Ensures all combinations of conditions are covered — nothing missed
- Easy to verify completeness and consistency of business rules
- Compact and precise — good for complex conditional/business logic
- Easy to convert into code (if-else / switch logic) or test cases
Disadvantages
- Can get very large with many conditions (2ⁿ rules for n binary conditions)
- Not intuitive for sequential/procedural logic (use flowcharts instead)
When to Use
- Business rules with multiple independent conditions (e.g., loan approval, discount eligibility, insurance premium calculation)
Exam tip: Practice constructing a decision table for a given business rule (e.g., discount rules, loan eligibility) — a classic numerical/practical question. Remember: n conditions → up to 2ⁿ rule columns.