My interest in code generation has lead me away from viewing the database schema as the "one true representation" of the system to thinking that maybe XML Schemas are a better of creating a single point of truth for a system. While I've known about and used scheams for a little while (in typed datasets for example) I was not aware until recently of the Schema Object Model (SOM) in the .NET framework. It seems like an intriguing place to start if/when I start writing tools to generate things from scheams and want to go more of a "code" (CLR) approach rather than an XSLT approach. Here are some links I found interesting.
http://www.xml.com/pub/a/2002/12/04/som.html
http://www.microsoft.com/seminar/shared/asp/view.asp?url=/seminar/en/20020731xmlmod09_56k/manifest.xml&WMPVer=7.0.0.1304
http://www.codeproject.com/dotnet/xsdeditor.asp?target=xsd