improved the DbUsage function which is more of a template anyway