<?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>All Free Tech &#187; data modeler</title>
	<atom:link href="http://www.allfreetech.com/tag/data-modeler/feed" rel="self" type="application/rss+xml" />
	<link>http://www.allfreetech.com</link>
	<description>For developers</description>
	<lastBuildDate>Tue, 01 Feb 2011 13:45:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Introducing SQL Developer Data Modeler: Part 2</title>
		<link>http://www.allfreetech.com/database/introducing-sql-developer-data-modeler-part-2-38.html</link>
		<comments>http://www.allfreetech.com/database/introducing-sql-developer-data-modeler-part-2-38.html#comments</comments>
		<pubDate>Sat, 23 Jan 2010 02:51:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[data modeler]]></category>

		<guid isPermaLink="false">http://www.allfreetech.com/?p=38</guid>
		<description><![CDATA[Working with diagrams and their components You can waste away many hours laying out the elements on a diagram. Therefore, this aspect of modeling can be time consuming. However, a model serves as documentation and a communication device. Therefore, taking the time to make sure it is well annotated and clearly designed is important. Most [...]]]></description>
			<content:encoded><![CDATA[<h1>Working with diagrams and their components</h1>
<p>You can waste away many hours laying out the elements on a diagram. Therefore, this aspect of modeling can be time consuming. However, a model serves as documentation and a communication device. Therefore, taking the time to make sure it is well annotated and clearly designed is important. Most of the controls for the models are on the context menu, allowing you to modify individual aspects of the diagram. The context menu changes depending on whether you have an object or line selected, or you&#39;re just clicking in the open space. You can also set general defaults using <b>Tools | General Options | Diagram</b>. In this section, we&#39;ll look at the various options available when working with the diagrams.</p>
<h2>Formatting the elements</h2>
<p>Before moving a relationship line, entity, or table, you can dramatically change the impact and readability of a large diagram just by changing the colors. This is readily demonstrated when importing from two or more schemas. Using the previous example where we imported from two schemas, open one of the subviews and select all of the tables. With the objects selected, invoke the <b>Format Object</b> dialog using the context menu:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_09.png" /></p>
<p>If this is the first time you are adjusting the colors, the dialog does not display any colors as you open it. The colors used in the diagram are the default settings. Deselect <b>Use Default Color</b> and click on the <b>Background</b> and <b>Border Color</b> items to select and set the new color. When you are done, click on <b>OK</b> and note the changes applied to the subview. Switch to the main relational model to review the impact there. The color applied to the subview is also applied to the main model as shown. This is very useful when illustrating how tables in different schemas relate to each other. For example, take the HR and OE sample schema, all of the tables related to human resources are maintained in the HR schema, while those related to the order entry system are maintained in the OE schema. You may well have applications designed around the HR schema and others tied to the OE schema, but some may involve both. In the following relational model, the OE tables are now colored green, so we&#39;re able to identify them, but we can also see where the schemas link. We can see that a CUSTOMER may deal with one EMPLOYEE and has many ORDERS:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_10.png" /></p>
<p style="margin-left: 40px; margin-right: 40px;"><em><b>Selecting all of the tables in a model</b><br />
	Select any table and click on <b>Select Neighbors</b> from the context menu. Select <b>All Zones</b>, to select all of the tables. Use this instead of <i>Ctrl+A</i>, which selects all tables <i>and</i> all lines.</em></p>
<h2>Changing the default format settings</h2>
<p>Instead of changing individual items or even a set of items, you can change the default color for each of the element types displayed on a diagram. The <b>Tools | General Options | Diagram | Format</b> provides the ability to control the color of each of the elements displayed such as tables, views, and entities:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_11.png" /></p>
<p>To edit any of the elements in the dialog, double-click on the object, or select the object and the edit icon. This allows you to adjust the color of the item and to format the font. You can use the font color to highlight mandatory, Unique, or Foreign Keys.</p>
<h2>Setting general diagram properties</h2>
<p>Use the same <b>Tools | General Options | Diagram</b> to set model properties,which include:</p>
<ul>
<li>Displaying the grid</li>
<li>Controlling the background color of the diagram</li>
<li>Controlling the <b>Auto Route</b> feature which is <i>on</i> by default</li>
</ul>
<p>Set display properties for certain items on each of the models, including the control of:</p>
<ul>
<li>The diagram notation for the logical model, which supports the Barker and Bachman notations</li>
<li>The display of the relationship names for either the logical or relational models</li>
<li>The flow names for process models</li>
</ul>
<p>For example, to display the relationship names on an Entity Relationship Diagram (as seen below), check the display property on the <b>Tools | General Options | Model | Logical</b>, and ensure that the Relation Cardinality properties for the relationships are also set.</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_12.png" /></p>
<h2>Creating subviews and displays</h2>
<p>Adding subviews and displays offers you alternative ways of laying out elements on a diagram and for working with subsets of items. You can create multiple subviews and displays for either logical or relational models, and remove them as easily, without impacting the main models.</p>
<h3>Adding subviews to your design</h3>
<p>You have already encountered a subview by importing from a number of schemas in the data dictionary. Subviews are not only a reflection of the different schemas in a design, but they can also represent any subset of elements in the design, allowing you to work with a smaller, more manageable set of elements.</p>
<p>You can create a subview from the object browser by selecting:</p>
<ul>
<li>The <b>SubViews</b> node and using the <b>New SubView</b> context menu. In this case, you have a new empty diagram that you can populate by dragging tables or entities (depending on the subview in question) onto the page.</li>
<li>Any of the model tabs and then selecting the <b>Create SubView</b> menu. This creates a new and empty subview.</li>
<li>An element or elements on an existing model and using the <b>Create SubView from selected</b> context menu on the diagram. In this case, the new subview will contain the tables or entities you selected:</li>
</ul>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_13.png" /></p>
<p>The layout of the subview is not linked to the main model in any way. What <i>is</i> linked is how you format the items on the subview and any structural changes you make to the objects. You can continue to add new items to the subview by dragging them onto the surface from the object browser. When deleting items from the subview, you should choose whether the item is deleted:</p>
<ul>
<li>From the view (<b>Delete View</b>)</li>
<li>From the complete design (<b>Delete Object</b>)</li>
</ul>
<h3>Adding displays</h3>
<p>A display is an alternative view of a diagram, whether a main model or a subview, and is linked directly to that model. If you delete the model, the display is also deleted. Any items that you add or remove from displays are also automatically added or removed from the main model they are linked to.</p>
<p>To create a new display, select the tab of any model and select <b>Create Display</b> from the context menu. The new display created is, initially, a replica of the model you selected in both layout and items available. All additional displays are listed at the bottom of the model. In the following example, the <b>HR</b> subview has two displays created, as highlighted at the bottom of the screenshot, the main <b>HR</b> display and the new <b>Display_1</b>. The Create Display context menu is also illustrated:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_14.png" /></p>
<p>Use the new display to change the layout of the model and to adjust the level of detail displayed on the diagram.</p>
<p>A second display of the same model is useful when you want to show more or less detail on a model. You can, for example, create a display which only displays the entity or table names. Right-click in the space on a diagram and select <b>View Details | Names Only</b>. We&#39;ll discuss how to layout the diagram elements later.</p>
<p>
	&nbsp;</p>
<h3>Creating a composite view</h3>
<p>If you create a number of subviews, create a new diagram showing the composite models of each of these on a single layout. This serves as a useful reminder of the number of subviews or models you have by having a thumbnail of the various layouts. Alternatively, you can add a composite view of one subview and place it on another.</p>
<p>To create a composite view, select the model in the browser and drag it onto the diagram surface. You can drag any model onto any other diagram surface, except its own:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_15.png" /></p>
<p>Once you have the composite folder displayed on the diagram, display the composite model within that folder by selecting <b>Composite View</b> from the context menu. If the model you want to view has a selection of displays, then you can also select the display you want to see within that composite.</p>
<p>The following screenshot shows the, subview, displaying the composite models of the HR subview, the main logical model, and both displays of the logical model:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_16.png" /></p>
<h2>Controlling the layout</h2>
<p>When working with a large number of items in a model, it&#39;s important to keep the layout organized. A variety of tools to help with the process are explained in the following sections.</p>
<h3>Adjusting the level of detail displayed</h3>
<p>Change the amount of detail displayed in a table (or entity) using the <b>View Details</b> menu. It is invoked with a right-click on the white space of any diagram. The <b>View Details</b> menu has options for displaying:</p>
<ul>
<li>All Details</li>
<li>Names Only</li>
<li>Columns</li>
<li>Datatype</li>
<li>Keys</li>
</ul>
<h3>Adjusting the width and height across the model</h3>
<p>If you have a large diagram and want to see how tables or entities relate to each other, you can create a more compact model using a display, without impacting the main model. This can be done by setting the details to display the name only and then resizing and repositioning the objects.</p>
<p>In the following screenshot, we have set the model to display only the name of the tables. Create a more compact diagram by resizing one of the tables to a more fitting set of dimensions, select the rest, and then resize them all to the same width and height:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_17.png" /></p>
<h3>Controlling alignment</h3>
<p>Once you have positioned the items, align them to complete the model. Use the <b>Edit</b> menu with the required items for top and left alignment as shown in the following screenshot:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_18.png" /></p>
<p style="margin-left: 40px; margin-right: 40px;"><em><b>Resizing and alignment</b><br />
	The first item you select is the one that drives the position for left or top alignment, and the item that controls the width and height of all subsequent items selected.</em></p>
<hr color="#ff9933" noshade="noshade" size="1" />
<h2>Working with lines</h2>
<p>A clear layout is fundamental to a clear diagram. This includes ensuring that lines do not cross or lie underneath tables. SQL Developer Data Modeler has an <b>Auto Route</b> feature that is on by default (seen in the following screenshot). This prevents you from manually moving any of the relationship lines yourself.</p>
<p style="margin-left: 40px; margin-right: 40px;"><em>Take manual control of the lines by using a right-click on the white space of the diagram and deselecting <b>Auto Route</b>. You can also set the <b>Auto Route</b> option to off, by default, using the <b>Tools | General Options | Diagram</b> setting.</em></p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_19.png" /></p>
<p>Once you have control of the lines, you can select any relationship line and use the context menu to:</p>
<ul>
<li>Add Elbow&mdash;to reroute a line around other shapes</li>
<li>Remove Elbow</li>
<li>Straighten Lines&nbsp;</li>
</ul>
<h3>Managing lines with elbows</h3>
<p>For lines that have elbows (angles), you can select any point on the line to move them and change the shape. Moving the line also moves the end points of the line. You cannot select and move the end points themselves. You can also select any of the elbows to change the angles within the lines:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_20.png" /></p>
<h3>Managing straight lines</h3>
<p>Diagrams are neater if there are fewer lines crossing and more straight lines. Where possible, remove the elbows and straighten lines. There is an option to straighten lines by removing all elbows on the lines. <b>Straighten Lines</b> will create a horizontal straight line between two tables or entities next to each other, and a diagonal line between elements that are not adjacent. You can only move the endpoints on a straight line and not the entire line.</p>
<p style="margin-left: 40px; margin-right: 40px;"><em><b>Moving a straight line</b><br />
	To select and move a straight line, add an elbow. Then, without bending the line, you can select and position it where you choose to without needing to move both endpoints.</em></p>
<h1>Integration with Oracle SQL Developer</h1>
<p>SQL Developer 2.1 includes the Data Modeler Viewer extension. This viewer provides users with the option of opening existing SQL Developer Data Modeler diagrams or creating models based on the database connection. To open the Data Modeler in SQL Developer, select <b>Tools | Data Modeler</b>. This opens the <b>Logical</b> and <b>Relational</b> model tabs. Once open, you can open any data model created in the Data Modeler. To review the details of the model in the navigator, select <b>View | Data Modeler | Browser</b>.</p>
<p>You can open any Data Modeler model in SQL Developer 2.1 by selecting File | Open Data Modeler Design. Once you have the model and the Data Modeler browser open, you can browse and review all of the model properties. The model and properties are all read-only:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_56.png" /></p>
<h2>Creating a new model</h2>
<p>The Data Modeler Viewer extension to SQL Developer also allows you to create models of the tables, views, and constraints in the database connections you have access to. To create a new model, expand the database connection in the Connections navigator, and then select the tables you want to include on a diagram. Drag the selection on the relational model (as seen in the following screenshot). You can&#39;t save the model, but you can move the objects on the diagram to change the default layout.</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_57.png" /></p>
<p>
	&nbsp;</p>
<h2>Creating and running reports</h2>
<p>An important aspect of building a data model is to run reports against the designs, to ascertain if there are:</p>
<ul>
<li>Tables without columns</li>
<li>Entities without attributes</li>
<li>Columns or attributes without data types set</li>
</ul>
<p>SQL Developer and the SQL Developer Data Modeler work together to support this functionality. You can use the Data Modeler to create and save the design to the reporting repository, and then use SQL Developer to run the shipped reports against the saved design.</p>
<h3>Setting up the reporting schema</h3>
<p>Before you can export any designs to the reporting schema, you need to create a user which&nbsp; will own the tables in the reporting repository. The repository is made up of 42 tables, with columns and associated indexes. You can use either the SQL Worksheet, or the <b>Create User</b> context menu on <b>Other Users</b>, to create a repository owner. Grant the user <i>CONNECT</i> and <i>RESOURCE</i> privileges.</p>
<p>Starting in SQL Developer Data Modeler, create and refine your data model designs. Once they are ready, select <b>Files | Export | To Reporting Schema</b>. This action invokes the <b>Export to Reporting Schema</b> dialog:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_58.png" /></p>
<p>The first time you export your design, you&#39;ll need to create a connection to the new repository schema. Click on the <b>Add</b> button to invoke the <b>New Database Connection</b> dialog. The repository is built in an Oracle database, so the connection details here are for an Oracle connection. Once you have created the connection you can reuse it on subsequent exports. Select the new connection, and click on <b>OK</b>. The first time you perform the export, the tables for the repository are created in the repository schema. Subsequent exports write new records to the tables.</p>
<p>Having exported the design, open SQL Developer and select the <b>View | Reports</b> tab. Expand the <b>Data Modeler Reports</b> node. There are two categories of reports available, as shown in the following screenshot. These are <b>Design Content</b> and <b>Design Rules</b>:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_59.png" /></p>
<p>By default, the latest report for each design is displayed in the report. In order to see all exports of the design, enter <b>FALSE</b> in the <b>Enter Bind Values</b> dialog when running the report, and then click on <b>Apply</b>:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_60.png" /></p>
<p>Use the reports to verify the completeness of your design, or create additional reports to extract further detail about your models. In the following screenshot, we have run the <b>Design Rules | Relational Model | Columns</b> report to determine which columns have no data type set. The report also provides the tables these columns belong to:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_61.png" /></p>
<p>
	&nbsp;</p>
<h1>Summary</h1>
<p>In this article, you have had an insight into the features offered by SQL Developer Data Modeler.</p>
<p>The subject of data modeling is vast, and this article only introduced some of the many and varied features available in SQL Developer Data Modeler. This article introduced some of the utilities available in SQL Developer Data Modeler. You also learned about the integration points with SQL Developer and the Data Modeler Viewer in SQL Developer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allfreetech.com/database/introducing-sql-developer-data-modeler-part-2-38.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing SQL Developer Data Modeler: Part 1</title>
		<link>http://www.allfreetech.com/database/introducing-sql-developer-data-modeler-part-1-36.html</link>
		<comments>http://www.allfreetech.com/database/introducing-sql-developer-data-modeler-part-1-36.html#comments</comments>
		<pubDate>Sat, 23 Jan 2010 02:50:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[data modeler]]></category>

		<guid isPermaLink="false">http://www.allfreetech.com/?p=36</guid>
		<description><![CDATA[Oracle SQL Developer Data Modeler is available as an independent product, providing a focused data modeling tool for data architects and designers. There is also a Data Modeler Viewer extension to SQL Developer, which allows users to open previously created data models and to create read-only models of their database schemas. SQL Developer Data Modeler [...]]]></description>
			<content:encoded><![CDATA[<p>Oracle SQL Developer Data Modeler is available as an independent product, providing a focused data modeling tool for data architects and designers. There is also a Data Modeler Viewer extension to SQL Developer, which allows users to open previously created data models and to create read-only models of their database schemas. SQL Developer Data Modeler is a vast tool, supporting the design of logical Entity Relationship Diagrams, and relational models, with forward and reverse engineering capabilities between the two. It supports multi-dimensional, data flow, data type, and physical models, and allows files to be imported from a variety sources and exported to a variety of destinations. It allows users to set naming conventions and verify designs using a set of predefined design rules. Each of these topics is extensive, so in this two-part article by <b>Sue Harper</b> we&#39;ll review a few of the areas, illustrating how you can use them and highlight a few key features, using the independent, stand alone release of SQL Developer Data Modeler. We&#39;ll include a brief review of the integration points of the Data Modeler Viewer extension to SQL Developer. The product offers support for Oracle and non-Oracle Databases. In the interest of time and space, we have elected to only work with the Oracle database.<span id="more-36"></span></p>
<h1>Oracle SQL Developer Data Modeler</h1>
<p>SQL Developer Data Modeler provides users with a lightweight tool which provides application and database developers a quick and easy way of diagrammatically displaying their data structures, making changes, and submitting the new changes to update a schema. In this article, we will not attempt to teach data modeling (except to provide some generally accepted definitions). Instead, we will discuss how the product supports data modeling and a few of the features provided. There are a variety of books available on the subject, which describe and define modeling best practice.</p>
<h2>Feature overview</h2>
<p>The Data Modeler supports a number of graphical models and a selection of text-based models. The graphical models are:</p>
<ul>
<li><b>Logical</b>&mdash;this is the entity relationship model or <b>Entity Relationship Diagram</b> (<b>ERD</b>), and comprises entities, attributes, and relationships.</li>
<li><b>Relational</b>&mdash;this is the schema or database model and is comprised of tables, columns, views, and constraints. In SQL Developer Data Modeler, these models are database independent, and need to be associated with the physical model to support database specific DDL.</li>
<li><b>Data Types</b>&mdash;this is the model that supports modeling SQL99 structured types and for viewing inheritance hierarchies. The data types modeled here are used in both the logical and relational models.</li>
<li><b>Multidimensional models</b>&mdash;these models support fact, dimension, and summary classifications for multi-dimensional models.</li>
<li><b>Data Flow</b>&mdash;these models support the definition of primitive, composite, and transformational tasks.</li>
</ul>
<p>The following support these graphical models:</p>
<ul>
<li><b>Domains</b>&mdash;these allow you to define and reuse a data type with optional constraints or allowable values. You can use domains in the Logical and Relational models.</li>
<li><b>Physical</b>&mdash;this model is associated with a relational model and defines the physical attributes for a specific database and version.</li>
<li><b>Business Information</b>&mdash;this allows you to model or document the business details that support a design.</li>
</ul>
<p>Tying these graphical and textual models together are a variety of utilities, which include:</p>
<ul>
<li>Forward and reverse engineering between the Logical and Relational models</li>
<li>Import from various databases</li>
<li>Export, including DDL script generation, for various databases</li>
<li>Design Rules for verifying standards and completeness</li>
<li>Name templates, glossary, and abbreviation files for supporting naming standards</li>
</ul>
<h2>Integrated architecture</h2>
<p>SQL Developer Data Modeler is made up of a number of layers, which have a tightly synchronized relationship. The Logical model is thought of as the core of the product, providing the starting point for any design, and feeding details into other models. The following diagram shows an illustration of how the models relate to each other:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_01.png" /></p>
<p>The logical ERD provides the basis for one or more relational models, and each of these feeds into one or more physical models, which are in turn used for the DDL generation. You can create separate data types models and use the defined data type in either the logical or relational models. Both relational and logical models can have multiple subviews created, and each subview can have many displays created.</p>
<h1>Getting started</h1>
<p>SQL Developer Data Modeler is an independent product, and with the exception of the Data Modeler Viewer extension to SQL Developer 2.1, is not packaged with other Oracle tools. You can download it and install it in a directory of your choice, with no impact on other tools. To install, simply unzip the file.</p>
<h2>Installing and setting up the environment</h2>
<p>Getting started with SQL Developer Data Modeler is straightforward. Follow the links from the Data Modeler site on OTN, <a href="http://www.oracle.com/technology/products/database/datamodeler" target="_blank">http://www.oracle.com/technology/products/database/datamodeler</a> to the download location. You are offered a choice of files to download:</p>
<ul>
<li>For Microsoft Windows, a ZIP file with or without the JRE included</li>
<li>For the Mac OS X, a ZIP file without the JRE included</li>
<li>For Linux, a ZIP file without the JRE included</li>
</ul>
<p>For any of these ZIP files, extract the file contents and run the <i>datamodeler.exe</i>, which is in the top-level <i>/datamodeler</i> folder, or in the <i>/datamodeler/bin</i> folder. For Linux, use the <i>datamodeler.sh</i> executable.</p>
<p>If the file you choose does not include a JRE, you will be prompted on startup for the location of your installed JRE. The minimum supported release is JRE 1.6 update 6.0.</p>
<h3>Oracle clients and JDBC drivers</h3>
<p>If you are designing and building a model from scratch, or have access to the DDL script file for importing models, then you do not need to have access to a database. However, if you want to import from a database, you&#39;ll need to create a database connection. In this case, there is no need for an Oracle client in your development environment because you can use the thin JDBC Driver to connect to the database. SQL Developer Data Modeler also supports the TNS alias. Therefore, if you have access to a <i>tnsnames.ora</i> file, or have other Oracle software installed in your environment, you can access the <i>tnsnames</i> file to make the database connection if and when required.</p>
<h2>Creating your first models</h2>
<p>The Data Modeler browser starts with empty <b>Logical</b> and <b>Relational</b> models. This allows you to start a new design and build a model from scratch, whether a logical model with entities and attributes, or a relational model with tables and columns. The Data Modeler also supports metadata to be imported from a variety of sources, which include:</p>
<ul>
<li>Importing metadata from:
<ul>
<li>DDL scripts</li>
<li>Data dictionary</li>
</ul>
</li>
<li>Importing from other modeling tools:
<ul>
<li>Oracle Designer</li>
<li>CA Erwin 4.x</li>
</ul>
</li>
<li>Importing other formats:
<ul>
<li>VAR file</li>
<li>XMLA (Microsoft, Hyperion)</li>
</ul>
</li>
</ul>
<p>The context menu displaying the choices available is shown in the following screenshot:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_02.png" /></p>
<p>Once you have created and saved your models, you can open these or share them with colleagues. To open an existing model, use the menu:</p>
<ul>
<li><b>File | Open</b>&mdash;browse to the location of the files, which then opens the full design with all of the saved models</li>
<li><b>File | Recent Designs</b>&mdash;opens the full design, with all of the saved models, with no need to first search for the location</li>
<li><b>File | Import | Data Modeler Design</b>&mdash;more granular, offering a choice of models saved in a set of models</li>
</ul>
<p style="margin-left: 40px; margin-right: 40px;"><em><b>Recent diagrams</b><br />
	Use <b>File | Recent Diagrams</b> to display a list of all diagrams you have recently worked on and saved. Using this approach saves you from needing to browse to the location of the stored files.</em></p>
<p>
	&nbsp;</p>
<h2>Importing from the Data Dictionary</h2>
<p>There are many ways to start using the tool by just starting to draw any one of the model types mentioned.</p>
<p>In the screenshot shown earlier, we highlighted the <b>File | Import | Data Dictionary</b> option. Using this allows you to import from Oracle 9<i>i</i>, Oracle 10<i>g</i>, Oracle Database 11<i>g</i>, Microsoft SQL Server 2000 and 2005, and IBM DB2 LUW Versions 7 and 8.</p>
<h3>Creating a database connection</h3>
<p>Before you can import from any database, you need to create a database connection for each database you&#39;ll connect to. Once created, you&#39;ll see all of the schemas in the database and the objects you have access to.</p>
<p>Access the <b>New Database Connection</b> dialog from the <b>File | Import</b> wizard (seen in the following screenshot). If you have no connections, click on <b>Add</b> to create a new connection.</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_03.png" /></p>
<p>For a <b>Basic</b> connection, you need to provide the <b>Hostname</b> of the database server, the <b>Port</b>, and <b>SID</b>. The connection dialog also supports TNS alias and the advanced JDBC URL.</p>
<p style="margin-left: 40px; margin-right: 40px;"><em>Before you can add connections for non-Oracle databases, you need to add the required JDBC drivers. To add these drivers, use <b>Tools | General Options | Third Party JDBC Drivers</b>.</em></p>
<h3>Using the import wizard</h3>
<p>Once you have a connection created, select the connection and continue using the dialog by clicking on <b>Next</b>. You can select more than one schema during import. In the example below, we have selected two schemas, which results in three diagrams, one central model with all of the imported tables and views, and two <i>subviews</i>. When importing, a separate subview is created for each schema you select and all of the imported objects are displayed in that schema (this is not the only role for subviews).</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_04.png" /></p>
<p>In the <b>Import Wizard</b> displayed, there is a set of checkboxes and buttons below the listed schemas. By selecting <b>All Selected</b>, the screens that follow will have all instances of all objects automatically selected. Depending on what you are planning to import, it is often easier to keep that deselected and then use the <b>Select All</b> button on each object type tab:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_05.png" /></p>
<p>Once you have selected the schemas, you can select the individual objects. <b>Tables</b> and <b>Views</b> are placed on the central Relational model and onto the respective subviews for each schema. All other objects, such as <b>Roles</b>, <b>Users</b>, and <b>TableSpaces</b>, are maintained in the Physical model listed in the object browser.</p>
<p>A summary of objects to be imported is displayed and you are offered the choice of the model destination. The default destination is <b>Relational_1</b>. The choice given here is needed for second or any subsequent imports. For these you need to decide whether you&#39;ll want to merge the objects into an existing model or create a new model.</p>
<p>To create the initial model, complete the dialog and select <b>Finish</b>. Each time you import a set of database objects, a log file of the completed activity is created, which tallys the number of statements and errors. It is worth saving the log files to use for troubleshooting later.</p>
<p style="margin-left: 40px; margin-right: 40px;"><em>Importing multiple schemas from the <b>Data Dictionary</b> creates a central Relational model and a subview for each of the schemas imported.</em></p>
<h3>Reviewing the results</h3>
<p>Once the import is complete, the main Relational diagram opens:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_06.png" /></p>
<p>The previous screenshot shows a few of the tables imported into the Relational model. To see the initial subviews created for each schema created, expand the <b>Relational Models</b> node and then the <b>SubViews</b> node. Right-click on one of the schema subviews listed and select <b>Show Diagram</b>.</p>
<p>In the following screenshot, we have opened the <b>HR</b> subview and are preparing to open the <b>OE</b> subview:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_07.png" /></p>
<h3>Saving designs</h3>
<p>As you work, it is wise to save the design you are working on. It is prudent, in case something goes wrong, and necessary if you are going to close and reopen the tool later. Initially, a design is untitled. You can change this by saving the design. Once saved, the new name appears in the browser, and a set of folders and XML files are saved on your file system:</p>
<p style="text-align: center;"><img src="http://www.packtpub.com/files/images/6262_10_08.png" /></p>
<p>When you save a design, a folder and a file of the same name are created. The previous screenshot shows Windows Explorer with a folder of a saved design. Here, the top-level folder is called MyFirstModel, as is the top-level XML file. It is this top-level file that you select when opening a design. All of the files are XML and can be read. Do not edit these as doing so can corrupt your design.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allfreetech.com/database/introducing-sql-developer-data-modeler-part-1-36.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

