A while back I wrote up a blog post on how grooming works for the OpsMgr DB and the warehouse http://blogs.msdn.com/steverac/archive/2007/12/13/scom-2007-operational-and-datawarehouse-grooming.aspx

Recently I put the detailed grooming steps for the OpsMgr DB into a graphical form that I share here.  Please note – even though there are specific tables shown here don’t consider this posting sanction to modify these tables.  Doing so is unsupported and the tables are included here as information only and to show the total snapshot of the grooming process.  Further, the diagram below shows the detail around grooming the OpsMgr DB for partition objects (event/perf) but leaves detail about grooming other data types, such as self-tuning threshold data, alerts, state changes, job status, etc.  Information about ACS grooming, discovery data grooming, data warehoulse grooming, etc., is also absent.  All that to say, grooming is a multi-step process and, while many of the moving parts are shown below, many are also not detailed.