complex software and hardware solutions for corporate bussinesses and small offices
complex software and hardware solutions for corporate bussinesses and small officescomplex software and hardware solutions for corporate bussinesses and small officescomplex software and hardware solutions for corporate bussinesses and small officesEnglishcomplex software and hardware solutions for corporate bussinesses and small offices
complex software and hardware solutions for corporate bussinesses and small officesConceptDraw Logocomplex software and hardware solutions for corporate bussinesses and small officesCSO Company Site
complex software and hardware solutions for corporate bussinesses and small officesHomeProductsSolutionsBuyDownloadSupportContact
complex software and hardware solutions for corporate bussinesses and small offices    
complex software and hardware solutions for corporate bussinesses and small offices
complex software and hardware solutions for corporate bussinesses and small officescomplex software and hardware solutions for corporate bussinesses and small offices
complex software and hardware solutions for corporate bussinesses and small offices
Home :: Products :: ConceptDraw V :: Wizard Tour :: Database Model

ConceptDraw Wizard Tour

Prev :: Content :: Next

What is Database Model Diagram

Working with databases, there always occurs a necessity of structure or data visualization. As well as in many other cases, visual presentation of information helps a specialist in making decisions.

Everything's changing in this world, and business-requirements to informational systems is not an exception. As a result, such systems are constantly being complemented, extended, and integrated. Their number is growing and they are becoming more multifunctional. Sooner or later, it gets clear that the time for principal changes has come, and system reengineering is critical. It does not really matter, what exactly turned a reason for reengineering, whether it is leaving of the leading developer, or worsened relationships with the platform supplier, or changing the level of technical support, financial status of the contractor or the system's moral misfit to up-to-date standards. In any case, you'll need the database migration or modernization in the end. As a variant, a new developer should get to know the system he is going to work with. He is lucky if the system's structure has been quite fully documented. And what if on the contrary, the documentation has not initially been taken care of? What if only accidental undocumented changes have been done since then? And, at last, if you just need a visual start document for making changes in the database structure. In all the mentioned above cases you need to build a database model upon the ready basis.

It is this very problem that Database Model Diagram Wizard solves. Conventionally, for relation databases it builds up a model in the form of Database Model Diagram. In this diagram, tables are presented as rectangles. In the rectangles, in their turn, the name of the table, and also names and the data type of its fields are reflected. And relations are displayed as lines connecting dependant fields of a table with the fields they depend on. Special markers in connect dots of these lines with tables specify the relation type (one-to-one, one-to-many) and the role of specific fields (which of the two linked fields is dependant).

Back to Top

Generating Database Model Diagram

Select in Template Gallery category ERD & Database and start wizard Database Model Diagram.

A system dialog will appear which will offer to select a data source (DSN). If the DSN has not been created yet, you can create it in the same dialog.

Select Data Source

This is all the data the Master needs from the user. The rest will be "told" by DSN.

At first, the Master will check out whether the ODBC-driver can provide any information on the relations, and if there's no support for corresponding ODBC capabilities, it will show a corresponding message. In such a case the diagram will be built anyway, but there will be displayed tables only, with no relations.

Note. ODBC-driver informs about its capabilities with "reassurance". This message is provided by the parameter Conformance Level, which can possess one of the values: 1, 2 or 3. There is a capability of working with relations adequately, if the parameter is not lower than 2. But it may turn out that ODBC-driver does not support all the functions necessary to be considered a driver with Conformance Level, equal to 2, but it supports a part of them and just the very part we need. This, for instance, happens to ODBC-driver for MS SQL Server (driver from Microsoft, version 3). Even though its Conformance Level =1, it supports work with relations adequately. That's why the Wizard, having shown an unpleasant message to the user, will build up a full diagram in the end.

DataBase Structure

Let's see the way of presenting information in the diagram, on the example of the table Groups. In the upper part of the table, in grey background, its name is specified. The field enumeration is given below. So we get to know that there are 2 fields in this table: field GroupID of Integer type and Name of Text type. At that the field GroupID, as shown in the left column, is the primary key. This key name is PK_Groups. Besides, it's clear that this table is connected by relations with the other two: Students and Subj_Teach. In both relations the field GroupId is the field referred to by the foreign keys from the tables connected with it. In both cases, it's going about one-to-many relation type, and field GroupId is on side one (it's indicated by one dash). If the fields Group_ID in the fields Students and Subj_Teach represented unique fields, the relation then would be one-to-one and there would be one dash on either side.

Back to Top

Editing documents. Libraries

If we needed this diagram as initial document for further changes, then it is important how it can be changed. There should be possibilities of adding and deleting tables and relations, and those of editing existing tables.

Entity Relationship

On starting the Wizard, two libraries are opened with the document: Entity Relationship and Object Relational. Objects from these libraries will help to display various peculiarities of databases. For editing Database Model Diagram, you will mostly need object Entity in library Entity Relationship. It is used for displaying the table.

To add a new table on the diagram, drag the object from the library to the page or duplicate (Ctrl+D) one of the already existing tables. Anyway, you need to edit the appeared table by changing its name and the set of fields. In order to edit a field, you need to select it.

Note. If the table has not been selected, the first mouse-click will select the whole table; and the second one will select the needed field. Note: they should be two separate clicks. Double-click will switch the table to text-edit mode of one of the fields, but not necessarily the field you need.

Besides text editing, you may need to delete or add rows to the table. It can be done with the help of context menu (items Add Row and Delete Row accordingly).

Add / Delete Row

In case the whole table is selected, one row at the end can be added or deleted. If one specific field is selected, a row with this field is deleted, or added before the row with this field.

To add a relation to the diagram, select one of relations and duplicate it by (Ctrl+D). After that, attach the ends of the obtained connector to the needed field (just drag it to the center of the needed side and drop it after the red circle appears). The connector will get the needed shape automatically.

Connector

Simplest is to delete a table or a relation. Just select the needed object and press Delete.

It has been going so far about essential changes of the diagram, connected with changes of database structure. It is worth reminding of some "redecoration" points. For instance, you can decide on whether to relocate some tables or to change the path for connector-relation manually. It is quite easy to do. Select your table and drag it with your mouse. Connectors-relations will customize the path to be optimal in the new situation. If you still want to change the path for connector, select it and change the position of the green control point in the center of the line.

Connector-Relation

It may occur that with new position of the tables it is easier to attach the connector to the other side of the field. In this case, the control point in the center will not help. Select the needed end and attach it another way.

There is one more possibility as for connectors-relations. Connected fields can be displayed as text of connector. For this, choose in the connector's context menu item Show Relation Property (to hide - Hide Relation Property).

Show Relation Property      Show Relation Property

Note. The connector's text is not changed automatically on connecting to another table. To edit it, select the connector and press F2.

Definitely, in a random spot of the diagram you can add any other objects and text notes. The given Wizard does not open supportive libraries for adding backgrounds, titles, etc., as for Database Model Diagrams using them is not typical. However, if you wish you can open them independently from folder <path to ConceptDraw>/Libraries/Miscellaneous. For more detail on these libraries, see Chapter Supportive Libraries.

Besides, in ConceptDraw Professional package there are some more libraries to let you build displays of databases in various notations (Chen ERD.cdl, Express-G.cdl, Martin ERD.cdl, ORM Diagram.cdl). You can find them in folder <path to ConceptDraw>/Libraries/ERD & Database.

Prev :: Content :: Next

ConceptDraw V

• Tour Content
• About Product
• Buy
Trial
 
Home Products Buy Download Support Contact Us
 
      Copyright® 2005 Computer Systems Odessa corp. All rights reserved.