<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Damir Systems Inc.</title>
	<atom:link href="http://www.damirsystems.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.damirsystems.com</link>
	<description>Database Design, Data Warehouse, ETL, BI</description>
	<lastBuildDate>Sun, 26 Aug 2012 13:25:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Tagging Observations</title>
		<link>http://www.damirsystems.com/?p=468</link>
		<comments>http://www.damirsystems.com/?p=468#comments</comments>
		<pubDate>Sun, 15 Nov 2009 19:00:38 +0000</pubDate>
		<dc:creator>Damir</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://www.damirsystems.com/?p=468</guid>
		<description><![CDATA[Let&#8217;s say we are using the observation pattern from the previous post to track properties (observations) of a large number of different objects (subjects). Each object can have many properties and different objects have different properties. The catch is that not all people (users) are interested in all properties. Using a computer for example; geeks [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say we are using the observation pattern from <a href="http://www.damirsystems.com/?p=467">the previous post</a> to track properties (observations) of a large number of different objects (subjects). Each object can have many properties and different objects have different properties. The catch is that not all people (users) are interested in all properties. Using a computer for example; geeks are interested in processor, memory and screen resolution; managers in pricing, warranty and preferred supplier; material handlers in packaging and weight. So, there is no sense in displaying all possible properties of an objects to all the people. </p>
<p>The model allows for tagging of property (observation) types, similar to labelling messages in Gmail, including tag hierarchies. For example height, weight and width would be tagged with: all, dimensions, physical; some other tags would be: accounting_interest, tracking_specific, and so on. This way a user can subscribe to a set of tags she may be interested in.</p>
<ul>
<li>One <strong>observation type</strong> (height, weight, color) can have many <strong>tags</strong>, one <strong>tag</strong> may be applied to many <strong>observation types</strong>. </li>
<li>Each <strong>tag</strong> may have a <strong>parent tag</strong> forming a hierarchy. </li>
<li>A <strong>user</strong> stores <strong>preferences</strong> for a set of <strong>tags</strong> that she usually monitors. </li>
</ul>
<p><img style="margin: 10px 10px 10px 5px" alt="alt text" src="http://www.damirsystems.com/dp_images/orgspecific_model_01A.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.damirsystems.com/?feed=rss2&#038;p=468</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Observation Pattern</title>
		<link>http://www.damirsystems.com/?p=467</link>
		<comments>http://www.damirsystems.com/?p=467#comments</comments>
		<pubDate>Sun, 01 Nov 2009 21:46:15 +0000</pubDate>
		<dc:creator>Damir</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[StackOverflow]]></category>

		<guid isPermaLink="false">http://www.damirsystems.com/?p=467</guid>
		<description><![CDATA[The post relates to a stackoverflow question on DB design and my answer there. To summarize relationships: One report can list many observations, an observation can appear in many reports. One subject (under observation) can undergo many observations, an observation relates to one subject only. An observation is of a specific type, there can be [...]]]></description>
			<content:encoded><![CDATA[<p>The post relates to a <a href="http://stackoverflow.com/questions/1655202/dynamic-table-generation" target="_blank">stackoverflow question on DB design</a> and my answer there.</p>
<p>To summarize relationships:</p>
<ul>
<li>One report can list many observations, an observation can appear in many reports. </li>
<li>One subject (under observation) can undergo many observations, an observation relates to one subject only. </li>
<li>An observation is of a specific type, there can be many observations of the same type. </li>
<li>Measurement and trait are types of observations. Measurement is a numeric observation, like height. Trait is a descriptive observation, like color. </li>
</ul>
<p>This is a simplified model based on Fowler&#8217;s observation pattern, for more details see <a href="http://www.amazon.ca/Analysis-Patterns-Reusable-Object-Models/dp/0201895420/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1257111424&amp;sr=1-1" target="_blank">Analysis Patterns by Martin Fowler</a>.</p>
<p><img style="margin: 10px 0px" src="http://www.damirsystems.com/dp_images/observation_model_01.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.damirsystems.com/?feed=rss2&#038;p=467</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Employee Scheduling</title>
		<link>http://www.damirsystems.com/?p=466</link>
		<comments>http://www.damirsystems.com/?p=466#comments</comments>
		<pubDate>Sun, 01 Nov 2009 16:14:39 +0000</pubDate>
		<dc:creator>Damir</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[StackOverflow]]></category>

		<guid isPermaLink="false">http://www.damirsystems.com/?p=466</guid>
		<description><![CDATA[Again, related to a stackoverflow question on DB design and my answer there. Simple three-table Kimball star to allow for easy reporting. You can consider dimDate and dimEmployee as lookup tables for date and employee attributes.]]></description>
			<content:encoded><![CDATA[<p>Again, related to a <a href="http://stackoverflow.com/questions/1634248/scheduling-employees-what-data-structure-to-use" target="_blank">stackoverflow question on DB design</a> and my answer there.</p>
<p>Simple three-table Kimball star to allow for easy reporting. You can consider dimDate and dimEmployee as lookup tables for date and employee attributes.</p>
<p><img style="margin: 10px 0px" src="http://www.damirsystems.com/dp_images/empschd_model_01.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.damirsystems.com/?feed=rss2&#038;p=466</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Organization Model</title>
		<link>http://www.damirsystems.com/?p=465</link>
		<comments>http://www.damirsystems.com/?p=465#comments</comments>
		<pubDate>Sun, 01 Nov 2009 15:34:18 +0000</pubDate>
		<dc:creator>Damir</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[StackOverflow]]></category>

		<guid isPermaLink="false">http://www.damirsystems.com/?p=465</guid>
		<description><![CDATA[This is related to a stackoverflow question on DB design and my answer there. To summarize relationships: Customer, vendor and distributor are types of organizations. One organization can have many contacts, a contact belongs to only one organization. A few notes on tables: The Organization table has columns common to all organizations. The Customer, Vendor, [...]]]></description>
			<content:encoded><![CDATA[<p>This is related to a <a href="http://stackoverflow.com/questions/1623690/sql-server-db-design-time-scenario-distributed-or-centralized" target="_blank">stackoverflow question on DB design</a> and my answer there.</p>
<p>To summarize relationships:</p>
<ul>
<li>Customer, vendor and distributor are types of organizations. </li>
<li>One organization can have many contacts, a contact belongs to only one organization. </li>
</ul>
<p>A few notes on tables:</p>
<ul>
<li>The Organization table has columns common to all organizations. </li>
<li>The Customer, Vendor, and Distributor tables contain only specific columns for each one. </li>
<li>The primary key in the Customer table also serves as a foreign key to Organization ID; same for Vendor and Distributor. </li>
</ul>
<p><img style="margin: 10px 0px" src="http://www.damirsystems.com/dp_images/org_model_01.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.damirsystems.com/?feed=rss2&#038;p=465</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Publication Model</title>
		<link>http://www.damirsystems.com/?p=464</link>
		<comments>http://www.damirsystems.com/?p=464#comments</comments>
		<pubDate>Sun, 01 Nov 2009 14:36:53 +0000</pubDate>
		<dc:creator>Damir</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[StackOverflow]]></category>

		<guid isPermaLink="false">http://www.damirsystems.com/?p=464</guid>
		<description><![CDATA[This is related to a stackoverflow question on DB design and my answer there. To summarize relationships: Book, article and magazine are (sub)types of publication. One publication can have many notes, a note belongs to only one publication. One publication can have many authors, one author can write many publications. Few notes on tables: Publication [...]]]></description>
			<content:encoded><![CDATA[<p>This is related to a <a href="http://stackoverflow.com/questions/1654071/db-design-to-use-sub-type-or-not" target="_blank">stackoverflow question on DB design</a> and my answer there.</p>
<p>To summarize relationships:</p>
<ul>
<li>Book, article and magazine are (sub)types of publication. </li>
<li>One publication can have many notes, a note belongs to only one publication. </li>
<li>One publication can have many authors, one author can write many publications. </li>
</ul>
<p>Few notes on tables:</p>
<ul>
<li>Publication table has columns common to all publication types. </li>
<li>Book, Article, and Magazine tables contain only specific columns for each one. </li>
<li>Primary key in the Book table also serves as a foreign key to Publication ID; same for Article and Magazine. </li>
<li>P_mm_A is a helper table for many to many relationship between Author and Publication tables. </li>
</ul>
<p><img style="margin: 10px 0px 5px" src="http://www.damirsystems.com/dp_images/pub_model_01.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.damirsystems.com/?feed=rss2&#038;p=464</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reverse Engineer a DB [7] – Toad Data Modeler, part 1</title>
		<link>http://www.damirsystems.com/?p=462</link>
		<comments>http://www.damirsystems.com/?p=462#comments</comments>
		<pubDate>Sat, 02 May 2009 16:54:42 +0000</pubDate>
		<dc:creator>Damir</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://www.damirsystems.com/?p=462</guid>
		<description><![CDATA[Toad Data Modeler is quite popular design tool from Quest Software. The installation went smooth, and I finished this whole exercise within 15 minutes from downloading Toad &#8212; impressive. As in all previous examples of the series, I am using the database described in the first post. &#160; Step 1 Start the program and click [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.quest.com/toad-data-modeler/" target="_blank">Toad Data Modeler</a> is quite popular design tool from <a href="http://www.quest.com/" target="_blank">Quest Software</a>. The installation went smooth, and I finished this whole exercise within 15 minutes from downloading Toad &#8212; impressive.</p>
<p>As in all previous examples of the series, I am using the database described in <a href="http://www.damirsystems.com/?p=453" target="_blank">the first post</a>.<br />
<br />&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_701.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_701_t.jpg" align="left" /></a></p>
<h4>Step 1</h4>
<p>Start the program and click on <em>File</em> –&gt; <em>Reverse Engineering.</em><br />
<br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_702.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_702_t.jpg" align="left" /></a></p>
<h4>Step 2</h4>
<p>The <em>Reverse Engineering Wizard</em> opens, note wizard steps on the left pane. The Alias is a name given to a collection of all setup parameters for a specific database; including connection, which objects to reverse, options to use, etc. At this point we have no previously defined aliases, so simply click <em>Next</em> to continue and create a new one.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_703.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_703_t.jpg" align="left" /></a></p>
<h4>Step 3</h4>
<p>For <em>Data Source</em>, select MS SQL 2005.&nbsp; As you can see from the list, all mayor databases are covered. Note the <em>DDL Script RE</em> branch, Toad allows reverse engineering of a database from a DDL script file too.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_704.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_704_t.jpg" align="left" /></a></p>
<h4>Step 4</h4>
<p>For the data provider I had only one option available – ADO.</p>
<p>  <br clear="all" />
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_705.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_705_t.jpg" align="left" /></a></p>
<h4>Step 5</h4>
<p>The connection details; Toad actually displays the connection string here. To create a new one, click on <em>Data Link Properties</em>.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_706.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_706_t.jpg" align="left" /></a></p>
<h4>Step 6</h4>
<p>We can type a connection string here, but it is simpler to click on <em>Build</em> and let Toad take care of the syntax.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_707.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_707_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_708.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_708_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_709.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_709_t.jpg" align="left" /></a></p>
<h4>Step 7</h4>
<p>For the provider, choose <em>SQL Native Client</em>. On the Connection tab, enter the name of the server or an IP address; fill-in the username and the password and select the database name. If the list is empty, try clicking on <em>Test Connection</em> first.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_710.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_710_t.jpg" align="left" /></a></p>
<h4>Step 8</h4>
<p>Now we have the connection string, click OK to continue.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_711.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_711_t.jpg" align="left" /></a></p>
<h4>Step 9</h4>
<p>Back to the main wizard form, simply click <em>Next</em> to continue.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_712.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_712_t.jpg" align="left" /></a></p>
<h4>Step 10</h4>
<p><em>Data Migrator</em> selection &#8212; a new concept, did not see this one in previous examples. However, the wording is self explanatory<em>,</em> so simply select <em>Reverse Engineering from Database MS SQL 2005</em>.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_713.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_713_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_714.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_714_t.jpg" align="left" /></a></p>
<h4>Step 11</h4>
<p>A list of objects to reverse engineer, followed by a list of options. Select all objects and accept default setting from the list of options. </p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_715.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_715_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_716.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_716_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_717.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_717_t.jpg" align="left" /></a></p>
<h4>Step 12</h4>
<p>Time to save all this settings as an alias, which can be quickly selected next time. Once saved, select the alias and click<em> Next</em>.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_718.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_718_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_719.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_719_t.jpg" align="left" /></a></p>
<h4>Step 13</h4>
<p>First select the<em> Schema</em> and than tables to reverse engineer; click on <em>Execute</em> to start the process. The bottom part of the form shows log messages.</p>
<p>  <br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_720.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_720_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_721.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_721_t.jpg" align="left" /></a></p>
<h4>Step 14</h4>
<p>Diagram on the left was automatically generated, obviously it needed some rearranging. After some tinkering with shapes, I got the one on the right.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p>This is enough steps for one post. In the next part we&#8217;ll look into the procedures editor, converting the relational to a logical model and reporting.  To be continued.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.damirsystems.com/?feed=rss2&#038;p=462</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reverse Engineer a DB [6] – Oracle SQL Developer Data Modeling</title>
		<link>http://www.damirsystems.com/?p=461</link>
		<comments>http://www.damirsystems.com/?p=461#comments</comments>
		<pubDate>Tue, 21 Apr 2009 18:59:15 +0000</pubDate>
		<dc:creator>Damir</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://www.damirsystems.com/?p=461</guid>
		<description><![CDATA[Oracle SQL Developer Data Modeling is still in the early adopter release, so it is free to download. However, it will turn into for-cost option of the Oracle SQL Developer. It is developed in Java, so you will need the latest Java SDK. My version is 1.5.1 build 525; it is obvious that some things [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.oracle.com/technology/products/database/sql_developer/files/Modeling.html" target="_blank">Oracle SQL Developer Data Modeling</a> is still in the early adopter release, so it is free to download. However, it will turn into for-cost option of the Oracle SQL Developer. It is developed in Java, so you will need the latest Java SDK. My version is 1.5.1 build 525; it is obvious that some things will change/improve in future versions, but the product is stable &mdash; I did not have a single crash. As in all previous posts of the series, I will use the same database, described in <a href="http://www.damirsystems.com/?p=453" target="_blank">the first post</a>.</p>
<p>The biggest problem I encountered was a driver for MS SQL Server; took me a while to get it working. To save you some time, here are the steps to take:</p>
<ol>
<li>Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=33291" target="_blank">jtds driver</a>;</li>
<li>Install it as described in <em>Help</em> –&gt; <em>Data Modeling Options</em> &#8211;&gt; <em>Third Party JDBC Drivers;</em></li>
<li>Reboot.</li>
</ol>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_601.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_601_t.jpg" align="left" /></a> </p>
<h4>Step 1</h4>
<p>Once you have the driver installed; after reboot, start the program and click on <em>File</em> –&gt; <em>Import</em> –&gt; <em>Data Dictionary.</em><br />
<br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_602.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_602_t.jpg" align="left" /></a> </p>
<h4>Step 2</h4>
<p>The import wizard opens. Note the four wizard steps: connect to database, select schema, select objects to import and generate design. The right-side pane contains already defined database connections, in this case it is empty. To add a new connection, click on the <em>Add </em>button<em>;</em> the <em>New Connection Editor</em> opens.<br />
<br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_603.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_603_t.jpg" align="left" /></a> </p>
<h4>Step 3</h4>
<p>First step is to select a database type; form the <em>Type </em>list select MS SQL Server 2005. At this version we have an option of Oracle, MS SQL Server, IBM DB2/UDB and JDBC/ODBC bridge for generic ODBC access. Keep in mind that the program uses Java drivers natively.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_604.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_604_t.jpg" align="left" /></a> </p>
<h4>Step 4</h4>
<p>Fill in all other connection parameters.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_605.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_605_t.jpg" align="left" /></a> </p>
<h4>Step 5</h4>
<p>The database is now present in the connection list. Select the database from the list and click on <em>Test Connection</em>, it should work.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_606.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_606_t.jpg" align="left" /></a> </p>
<h4>Step 6</h4>
<p>The connection for this example is actually to the MS SQL Server, which contains several databases. Select the database to reverse-engineer; all schemata below the database name are automatically selected.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_607.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_607_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_608.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_608_t.jpg" align="left" /></a> </p>
<h4>Step 7</h4>
<p>Which objects to import? Oracle allows for fine grain selection of what to reverse-engineer, objects are grouped into categories, each category on a tab. On the <em>Tables</em> tab I have selected all except the <em>sysdiagrams</em> table, and on the <em>Procedures Tab</em> all stored procedures starting with &quot;p_&quot;; as in most of previous examples.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_609.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_609_t.jpg" align="left" /></a> </p>
<h4>Step 8</h4>
<p>Review the summary and click <em>Finish</em> to start the reverse-engineering process.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_610.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_610_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_611.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_611_t.jpg" align="left" /></a> </p>
<h4>Step 9</h4>
<p>The diagram one on the left was automatically generated, I have rearranged shapes to get the one on the right. When moving shapes around, make sure to disable the <em>Line Auto Route</em> option, found under <em>Tools</em> –&gt; <em>General Options</em> –&gt; <em>Diagram.</em> The graphical part is still a bit rough and slow, but will probably be improved by the time the program reaches commercial release.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_612.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_612_t.jpg" align="left" /></a> </p>
<h4>Step 10</h4>
<p>To move to the Logical level (model) select <em>Design</em> – &gt; <em>Engineer to Logical Model.</em></p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_613.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_613_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_614.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_614_t.jpg" align="left" /></a> </p>
<h4>Step 11</h4>
<p>Again Oracle offers a detailed list of options  &mdash; what to engineer. The logical model is on the right. For this level Oracle offers <a href="http://en.wikipedia.org/wiki/Entity-relationship_model" target="_blank">Barker and Bachman notations</a>, the example is in Barker (crow feet) notation. It is easy to switch, right-click on the diagram and select a different notation;<br />
<br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_615.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_615_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_616.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_616_t.jpg" align="left" /></a> </p>
<h4>Step 12</h4>
<p>The navigation pane shows object for both, logical and relational levels. Explore the objects to see mapping; table – entity, column – attribute, foreign keys – relations.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_617.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_617_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_618.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_618_t.jpg" align="left" /></a> </p>
<h4>Step 13</h4>
<p>Still have to find my stored procedures somewhere; they are located in the physical model. To view the physical model &#8212; with database objects &#8212; select <em>Physical</em> –&gt; <em>Open Physical Model</em> from the menu, and then select MS SQL Server from the list.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_619.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_619_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_620.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_620_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_621.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_621_t.jpg" align="left" /></a> </p>
<h4>Step 14</h4>
<p>Expand the <em>Physical Models</em> branch in the navigator and double-click on a procedure name to open the <em>Stored Procedures Editor</em>. </p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.damirsystems.com/?feed=rss2&#038;p=461</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reverse Engineer a DB [5] &#8211; ERwin</title>
		<link>http://www.damirsystems.com/?p=460</link>
		<comments>http://www.damirsystems.com/?p=460#comments</comments>
		<pubDate>Tue, 14 Apr 2009 06:48:16 +0000</pubDate>
		<dc:creator>Damir</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://www.damirsystems.com/?p=460</guid>
		<description><![CDATA[ERwin Data Modeler is a full-blown data modeling tool, allows for modeling on logical and physical levels, forward and reverse engineering of databases and data warehouses. Step 1 Start ERwin and click on Tools –&#62; Reverse Engineer. &#160; Step 2 Select Logical/Physical for the New Model Type, and SQL Server for the Target Database. &#160; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ca.com/us/data-modeling.aspx" target="_blank">ERwin Data Modeler</a> is a full-blown data modeling tool, allows for modeling on logical and physical levels, forward and reverse engineering of databases and data warehouses.</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_501.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_501_t.jpg" align="left" /></a></p>
<h4>Step 1</h4>
<p>Start ERwin and click on <em>Tools</em> –&gt; <em>Reverse Engineer.</em></p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_502.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_502_t.jpg" align="left" /></a></p>
<h4>Step 2</h4>
<p>Select Logical/Physical for the <em>New Model Type</em>, and <em>SQL Server</em> for the <em>Target Database.</em></p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_503.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_503_t.jpg" align="left" /></a></p>
<h4>Step 3</h4>
<p>Under the <em>Owners</em> option, type in <strong>dbo</strong>; leave all other options as per default. Find some time to return to this dialog and explore all the options for reverse-engineering.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_504.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_504_t.jpg" align="left" /></a></p>
<h4>Step 4</h4>
<p>The <em>SQL Server Connection</em> dialog opens, type in (or select) all the connection parameters and click <em>Connect</em>. The process starts as soon as the connection is established, you will see a progress bar and staus display during the reverse engineering process.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_505.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_505_t.jpg" align="left" /></a></p>
<h4>Step 5</h4>
<p>Here is the first diagram, pretty good. Time to rearrange shapes and change few display options.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_506.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_506_t.jpg" align="left" /></a><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_507.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_507_t.jpg" align="left" /></a></p>
<h4>Step 6</h4>
<p>The diagram on the left is on the <em>Physical</em> level and the one on the right is on the <em>Logical</em> level. You may have noticed that ERwin did not offer a list of tables, but has included all the tables owned by <strong>dbo</strong>, including the <em>sysdiagrams</em> table &#8212; in previous examples I have excluded the table. This is actually a correct behaviour, because the <em>sysdiagrams</em> is a part of the database and ERwin is a bi-directional tool, so it can be also used for database maintenance and refactoring.</p>
<p><br clear="all" /><br />
<a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_508.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_508_t.jpg" align="left" /></a></p>
<h4>Step 7</h4>
<p>Expand <em>Stored Procedures</em> branch on the <em>Model Explorer</em>; make sure you are on the <em>Physical</em> level. Right-click on a procedure as select <em>Properties</em>.</p>
<p><br clear="all" /></p>
<p>&nbsp;</p>
<p><a title="Click to enlarge." href="http://www.damirsystems.com/dp_images/revdb_509.png" target="_blank"><img style="display: inline; margin: 5px 20px 5px 0px" src="http://www.damirsystems.com/dp_images/revdb_509_t.jpg" align="left" /></a></p>
<h4>Step 8</h4>
<p>The <em>SQL Stored Procedure Editor</em> opens. All procedures staring with &quot;p_&quot; are mine, while those starting with &quot;sp_&quot; are part of the SQL Server diagram package, together with the <em>sysdiagrams</em> table. It is interesting to compare the <em>Code</em> and the <em>Expanded</em> tabs; with reverse-engineering, stored procedures are moved to model level &#8212; hence all the placeholders on the <em>Code</em> tab.</p>
<p><br clear="all" /></p>
<p>By poking around the <em>Model Explorer,</em> we can see all the reverse-engineered objects, including:</p>
<ul>
<li>Tables </li>
<li>Relationships (foreign &amp; primary keys) </li>
<li>Triggers </li>
<li>Stored procedures </li>
<li>Functions </li>
<li>Views </li>
<li>Logins </li>
<li>User IDs. </li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.damirsystems.com/?feed=rss2&#038;p=460</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
