OK so downloading isn’t the same as actively using, but nevertheless I’m pleased that my force-metadata-jdbc-driver JAR that allows SchemaSpy to produce ERD output like the sample below for a Force.com org has been downloaded
1000 times (as of September 2013) 2000 times (as of September 2015).
The code that presents a Force.com org via the JDBC metadata interfaces has been updated to make it simpler to use. This code allows tools like SchemaSpy and Open ModelSphere to work with a Force.com org.
In the case of SchemaSpy, a set of diagrams like this (and accompanying HTML descriptions of all the objects and fields) are produced:
PS Winter ’12 has a built in ERD viewer – see e.g. An ERD is Worth a Thousand Words: Schema Builder in Winter ’12 – that may meet some or all of your ERD needs so take a look at that first before considering the approach described below.
I looked around for a data modelling tool for Force.com that can output a complete data model but didn’t find one. (SoqlXplorer for OSX can produce diagrams but is an interactive tool. Other suggestions very welcome.) In the past when working with conventional JDBC databases I have used SchemaSpy. The cool thing about this is that the diagrams are automatically laid out in a rational way, and the accompanying HTML provides extra information and hyper-linking.
The opportunity to use SchemaSpy for Force.com comes from the fact that SchemaSpy primarily uses the java.sql.DatabaseMetaData interface part of the JDBC API which is relatively small and easy to implement. So with the benefit of SchemaSpy being open source to allow inspection and debugging, I went ahead and created a JDBC driver that uses the Force.com enterprise web service (DescribeSObjectResult, Field etc) to implement the parts of the JDBC API that SchemaSpy uses. That allows SchemaSpy to produce its output for a Force.com org.
Here is a small example of the output:
The driver and supporting libraries are available in the Google code project force-metadata-jdbc-driver along with the source code. This project is also linked from the Force.com Code Share project Force Metadata JDBC Driver for SchemaSpy.