Metrics calculation for the entire database

needs to be 'fused' together