Unit 3 Logic Modelling
Unit 3 Logic Modelling
A. Decision Table
A Decision Table is a systematic representation of decision-making processes,
designed to help organize complex logical rules and conditions. It is particularly useful
in decision support systems and logic modeling. Decision Tables present a clear and
structured way to handle combinations of conditions and corresponding actions or
outcomes.
A decision table is a table that indicates conditions and actions in a simplified and
orderly manner.
Decision tables are used to model complicated logic. It shows that all possible
combinations of conditions have been considered and when conditions are not met,
it is easy to see.
A decision table can be described as cause-effect table and is the best way to deal with
combination inputs with their associated outputs.
It is an excellent tool to use in both testing and requirements management. Using
decision tables it become easier for the requirements specialist to write requirements
which cover all conditions.
1. Condition Stubs : The conditions are listed in this first upper left part of the decision table
that is used to determine a particular action or set of actions.
2. Action Stubs : All the possible actions are given in the first lower left portion (i.e, below
condition stub) of the decision table.
BCA III – SAD Compiled By: GIRIJA 2
3. Condition Entries: In the condition entry, the values are inputted in the upper right
portion of the decision table. In the condition entries part of the table, there are multiple
rows and columns which are known as Rule.
4. Action Entries: In the action entry, every entry has some associated action or set of
actions in the lower right portion of the decision table and these values are called outputs.
2. Extended Entry: In the extended entry decision table, the condition entries have more
than two values. The decision tables use multiple conditions where a condition may have
many possibilities instead of only ‘true’ and ‘false’ are known as extended entry decision
tables.
4. Used in testing: A decision table is basically an outstanding technique used in both testing
and requirements management.
5. Helps to prepare requirements: It is a structured exercise to prepare requirements when
dealing with complex business rules.
6. Helps to model complicated logic: It is also used to model complicated logic.
Example:
Create decision table based on below conditions
Customers who order more than Rs.1000 will get 5% discount and additional 5%
discount and if they used our charge card.
Customers who do not order more than Rs. 1000 will get Rs. 25 coupons
All other customers receive Rs.5 coupon.
1 2 3 4 5
Preferred Customer Y Y Y Y N
Order more than Rs. 1000 Y Y N N Y
Used our charge card Y N Y N Y
5% Discount X X - - -
Additional 5% Discount X - - - -
Rs. 25 Bonus coupon - - X - -
Rs. 5 Bonus coupon - - - X X
Steps:
1. Place the name of the process in a heading at the top left.
2. Enter the conditions under the heading, with one condition per line,
3. Enter all potential combinations of Y/N (for yes and no) for the conditions. Each
column represents a numbered possibility called a rule.
4. Place an X in the action entries area for each rule to indicate whether to accept or
reject the order
B. Decision Tree
A decision tree is a decision tool that uses a branching method to illustrate every
possible outcome of a decision.
Decision trees can be drawn by hand or created with a graphics program or specialized
software. A decision tree begins with a single node, which have branches into possible
BCA III – SAD Compiled By: GIRIJA 4
outcomes. Each of those outcomes results to additional nodes, which branch off into
other possibilities. This gives it a tree-like shape.
In decision tree (tree structure), the nodes representing the place where we pick an
attribute and ask a question; edge represents the answers to the question and the
leaves represent the actual output.
Decision trees demonstrate cause-effect relationships, which provides a simplified
view of complicated process.
Basic assumptions for creating a decision tree:
At the beginning, all possible set is taken as root.
Records are distributed recursively on the basis of attribute values.
Order to placing attributes as root or internal node of the tree is used to define the
problem.
Decision Tree
Example:
(Decision tree according to above decision table)
We can derive a decision table from We can not derive a decision tree from
2.
the decision tree. the decision table.
It is used when there are small It is used when there are more number
5.
number of properties. of properties.
6. It is used for simple logic only. It can be used for complex logic as well.
C. Structure English
Structured English uses a simple English language to make structured programming easier for non-
professionals. The program is divided into various parts that are known as logical statements. These
statements are written in a simple English language.
Structured English is typically used for expressing logic with minimum complexity. Lower-level systems
usually require higher clarity and precision. This is achieved by decision tables and decision trees.
Example:
Advantages:
D. Data Dictionary
A Data Dictionary is a collection of names, definitions, and attributes about data elements
that are being used or captured in a database, information system, or part of a research
project. It describes the meanings and purposes of data elements within the context of a
project, and provides guidance on interpretation, accepted meanings and representation. A
Data Dictionary also provides metadata about data elements. The metadata included in a
Data Dictionary can assist in defining the scope and characteristics of data elements, as well
the rules for their usage and application.
What it does:
Stores metadata: It doesn't hold the actual data itself, but rather information about
the data, like its name, data type, size, format, description, and constraints.
Centralizes understanding: Provides a single source of truth for data definitions,
promoting consistency and shared understanding among developers, analysts, and
other stakeholders.
Improves data management: Facilitates data governance, quality control, and
maintenance by keeping track of changes and relationships between data elements.
Benefits:
Improved communication: Ensures everyone speaks the same "data language" and
avoids misunderstandings.
Reduced errors: Consistent data definitions minimize errors caused by
misinterpretations.
Enhanced maintainability: Makes it easier to understand and modify the system's
data structure when needed.
Better data quality: Facilitates enforcement of data rules and standards, leading to
cleaner and more reliable data.
These are some of the biggest benefits of using a data dictionary:
BCA III – SAD Compiled By: GIRIJA 10
For example, a commercial bank's database containing information about clients can have
attributes for client name, birth date, street address, financial savings, account and credit card
number, loans, etc.
Each attribute occupies a row in a spreadsheet, while various columns provide additional
elements that describe that attribute (whether it’s optional or required for a record, the type
of data, its location, etc.).
Active Data Dictionary: Active Database Dictionary is a type of database that is updated
automatically in case any changes are to be done to the database. These are self-
updating.
Passive Data Dictionary: Passive Databases are the databases that have to be
maintained or updated manually in case of any changes have been made to the system.
Assignment:
1. Define decision tables and explain how they are used to represent decision logic in
information systems.
2. Identify the key components of a decision table (conditions, actions, rules) and
explain their functionalities.
3. Describe the process of creating a decision table from a given scenario or set of rules.
4. Discuss the advantages and limitations of using decision tables compared to other
logic modeling techniques.
5. Define decision trees and explain their purpose in logic modeling.
6. Identify the different components of a decision tree (root node, internal nodes, leaf
nodes, branches) and explain their roles.
7. Describe the process of constructing a decision tree from a set of rules or a decision
table.
8. Compare and contrast decision trees and decision tables, highlighting their
advantages and disadvantages in different contexts.
9. Define structured English and explain its benefits in documenting system logic and
decision-making processes.
10. Describe the key characteristics and syntax rules of structured English, including
control structures (e.g., IF-THEN-ELSE, WHILE loops).
11. Create a structured English description for a simple decision-making process or
scenario.
12. Compare and contrast structured English with other logic modeling techniques like
decision tables and decision trees, considering their suitability for different
situations.
13. Define a data dictionary and explain its importance in information systems
development.
14. Identify the essential components of a data dictionary entry (e.g., data element
name, description, data type, format, source).
15. Describe the benefits of maintaining a well-defined and up-to-date data dictionary
for system development projects.