Data Structure Metrics

Get your answer for What is Data Structure Metrics? straight from this article. In software engineering, data is a critical component of any software project. During the development of software, various data are processed by the system, program, or module. These data can be input into the system, used internally within the software, or output from the system. In order to measure and analyze the data input, processing, and output, a set of metrics are used, which is known as Data Structure Metrics. These metrics provide a fundamental framework to evaluate and quantify the amount of data in the software system. Now, go through this article to get for more information on Data Structure Metrics in Software Engineering.

Check out the Data Structure Metrics Example to get a more clear idea about it.

Data Structure Metrics Example

Program Data Input Internal Data Data Output
Software Planner Program Size/ No of Software developer on team Model Parameter Constants Coefficients Est. project effort Est. project duration
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

Data Structure Metrics are primarily concerned with counting the data that is processed by software systems. While some metrics only focus on variables and constants within each module and ignore input-output dependencies, others take into account input/output situations. The main goal of Data Structure Metrics is to provide insight into the amount of data that is input to, internally processed in, and output from a software system or module.

To estimate the effort and time required for completing a software project, several Data Structure metrics are available. These metrics measure different aspects of how data is processed within the system, including:

  • Amount of Data
  • Usage of Data within a Module
  • Program Weakness
  • Sharing of Data among Modules

Amount of Data

The measurement of the Amount of Data involves various metrics, such as the number of variables (VARS), number of operands (η2), and total number of occurrences of variables (N2). The VARS metric counts the number of variables used in the program. The η2 metric counts the number of operands used in the program, including variables, constants, and labels.

The formula for η2 is η2 = VARS + Constants + Labels. The N2 metric computes the total number of occurrences of variables in the program.

Usage of Data within a Module

To measure the Usage of data within a Module metric, the average number of live variables is calculated. A variable is considered live from its initial reference until its last reference within the procedure.

Data Structure Metrics - Usage of Data within Module formula

Example – To determine the average number of live variables in a program with modules, the following equation can be used

Data Structure Metrics 2

One can use the following equation to compute the average span size (SP) for a program consisting of n spans, where (LV) denotes the average live variable metric computed from the ith module:

Data Structure Metrics 3

Program Weakness

The weakness of a program is closely linked to the weakness of its modules. In cases where the modules lack cohesiveness and are deemed weak, completing the project will require additional effort and time metrics.

Data Structure Metrics - Program Weakness Formula

Module Weakness (WM) = LV* γ

Since a program is usually comprised of multiple modules, assessing program weaknesses can provide valuable insight. Therefore, program weakness is defined as:

Data Structure Metrics 5

Where

  • WMi: Weakness of the ith module
  • WP: Weakness of the program
  • m: No of modules in the program

Sharing of Data Among Modules

The sharing of data between modules is a significant factor to consider. When there is an increase in data sharing among modules (higher coupling), the need for parameter passing between modules also increases, resulting in additional effort and time required to complete the project. Therefore, sharing data among modules is a critical metric to calculate the effort and time required for project completion.

Data Structure Metrics - Sharing of Data Among Modules

Data Structure Metrics - Sharing of Data Among Modules 1

Data Structure Metrics - Sharing of Data Among Modules 2

Hope this article regarding Data Structure Metrics has clarified your doubts. Follow tutorials.freshersnow.com for more concepts in Software Engineering.