A previous article discussed
a model generation scheme
that allows model architects to
effectively acquire knowledge and gain control of existing
Oracle databases. The very same approach can be used with SQL Server
databases, as described in this article. For a full overview and rationale
of the suggested approach (CSV vs. XML, XML and Somusar EF files, and so forth)
refer to the
article on Oracle metadata mining.
The specific solution described in this article allows to extract
metadata from Microsoft SQL Server 2005 Express Edition - Community Technology Preview December 2004. The extracted metadata describe the well-known
sample databases pubs and Northwind as well as the more recent and
feature-rich AdventureWorks database that features SQL schemas.
By means of SoProMach and SQL Server's sqlcmd this solution
extracts metadata about the following classes of constructs:
tables and constraints;
stored procedures and functions;
The overall process of this specific solution is shown in the figure below.
This solution has been tested with Microsoft SQL Server 2005 Express Edition - Community Technology Preview December 2004 and
SQL Server's sqlcmd running on both Windows 2000. It has been implemented
with SoProMach/Community Edition.