SQL Queries - CAST Central Base - Queries on Metrics - How to get the list of sub component metrics of any Parent Metric

Purpose of Query

This query provides the list of sub component metrics used for any parent metric be it Technical criteria, Business criteria or any Health factor.

Applicable CAST Version
Release
Yes/No
8.3.x(tick)
8.2.x(tick)
Applicable RDBMS
RDBMS
Yes/No
Oracle Server(question)
Microsoft SQL Server(question)
CSS(tick)
Query for CSS
SELECT DMTT.metric_parent_id, 
       DMTT.metric_id, 
       DMD.metric_description, 
       DMTT.aggregate_weight, 
       DMTT.metric_critical 
FROM   dss_metric_type_trees DMTT, 
       dss_metric_descriptions DMD 
WHERE  DMTT.metric_parent_id IN(SELECT metric_id 
                                FROM   dss_metric_descriptions DMTTT 
                                WHERE  DMTTT.metric_description = 'Parent_Metric_name') 
       AND DMTT.metric_id = DMD.metric_id 
       AND DMD.description_type_id = 0 
       AND DMD.language = 'ENGLISH' 
ORDER  BY DMTT.metric_parent_id 
Query result example

60013;61001;"Architecture - Multi-Layers and Data Access";6;0
60013;61003;"Programming Practices - OO Inheritance and Polymorphism";4;0
60013;61004;"Architecture - OS and Platform Independence";4;0
60013;61009;"Complexity - Algorithmic and Control Structure Complexity";7;0
60013;61010;"Complexity - OO Inheritance and Polymorphism";4;0
60013;61011;"Complexity - SQL Queries";6;0
60013;61013;"Architecture - Object-level Dependencies";7;0
60013;61014;"Programming Practices - Error and Exception Handling";10;0
60013;61022;"Volume - Number of Components";1;0
60013;61024;"Programming Practices - Structuredness";3;0
60013;61026;"Complexity - Technical Complexity";5;0
60013;61027;"Dead code (static)";2;0
60013;61029;"Complexity - Dynamic Instantiation";8;0
60013;66009;"Architecture - Reuse";4;0
60013;66065;"Secure Coding - Time and State";10;0
60013;66069;"Programming Practices - Unexpected Behavior";10;0
60013;66070;"Architecture - Architecture Models Automated Checks";6;0

Query result interpretation
In this example the query lists the sub components metrics and there weight used for the Heath factor of name "Robustness".
Query for Oracle
Enter the SQL query
Query result example

Query result interpretation

Query for SQL server
Enter the SQL query
Query result example

Query result interpretation

Notes/comments



Related Pages