# Data Structure Metrics

Essentially the need for software development and other activities are to process data. Some data is input to a system, program or module; some data may be used internally, and some data is the output from a system, program, or module.

### Example:

Program Data Input Internal Data Data Output
Payroll Name/Social Security No./Pay rate/Number of hours worked Withholding rates Overtime Factors Insurance Premium Rates Gross Pay withholding Net Pay Pay Ledgers
Spreadsheet Item Names/Item Amounts/Relationships among Items Cell computations Subtotal Spreadsheet of items and totals
Software Planner Program Size/No of Software developer on team Model Parameter Constants Coefficients Est. project effort Est. project duration

That's why an important set of metrics which capture in the amount of data input, processed in an output form software. A count of this data structure is called Data Structured Metrics. In these concentrations is on variables (and given constant) within each module & ignores the input-output dependencies.

There are some Data Structure metrics to compute the effort and time required to complete the project. There metrics are:

1. The Amount of Data.
2. The Usage of data within a Module.
3. Program weakness.
4. The sharing of Data among Modules.

1. The Amount of Data: To measure the amount of Data, there are further many different metrics, and these are:

• Number of variable (VARS): In this metric, the Number of variables used in the program is counted.
• Number of Operands (η2): In this metric, the Number of operands used in the program is counted.
η2 = VARS + Constants + Labels
• Total number of occurrence of the variable (N2): In this metric, the total number of occurrence of the variables are computed

2. The Usage of data within a Module: The measure this metric, the average numbers of live variables are computed. A variable is live from its first to its last references within the procedure. For Example: If we want to characterize the average number of live variables for a program having modules, we can use this equation. Where (LV) is the average live variable metric computed from the ith module. This equation could compute the average span size (SP) for a program of n spans. 3. Program weakness: Program weakness depends on its Modules weakness. If Modules are weak(less Cohesive), then it increases the effort and time metrics required to complete the project. Module Weakness (WM) = LV* γ

A program is normally a combination of various modules; hence, program weakness can be a useful measure and is defined as: Where

WMi: Weakness of the ith module

WP: Weakness of the program

m: No of modules in the program

4.There Sharing of Data among Module: As the data sharing between the Modules increases (higher Coupling), no parameter passing between Modules also increased, As a result, more effort and time are required to complete the project. So Sharing Data among Module is an important metrics to calculate effort and time.  ### Feedback   