I've created a simple application that reads the SQL Server 2005 schemas and creates an XML representation of it. Then I apply an XSLT stylesheet that transforms the schema into a BDC definition file.
My current delema is: The MOSS BDC processor reads the BDC definition file AND processes it serially. This means that entity names and identifier names that are referenced must be appear in the definition file BEFORE being referenced (It is necessary to reference entities and identifiers when creating association methods to retrieve related tables). This serial processing method works for simple database definitions, but when you get a real-world schema with a number of complicated data relationships, serial processing is a real pain. Thankfully Microsoft allows association methods be defined in the entity that appears on either side of a join, so with a lot of additional programming on my side, I can generate association method definitions when I detect that all entities have been processed. I'm not sure if this method will be effective for turnary relationships. With a little extra development time on Microsoft's part, a great deal of customer headaches could be avoided.

The Xml Generator application first reads the SQL Server 2005 schema tables and creates an Xml Schema definition. Then an XSLT stylesheet is used to translate the xml schema into a BDC definition file, which is then uploaded to the MOSS Shared Services Provider on the Sharepoint server.


Above is an example of a more complex table relationship that can be found in real-world schemas. 

The above example shows a turnary relationship which will cause problems attempting to ensure all entities are defined before an association method is generated.