Synchronize Relationships

How To Access:

  • Main Menu | Maintenance | Synchronize Relationships

  • Shortcut menu | Synchronize Relationships

  • Toolbar Item i_SynchronizeRelationship

SyncRelationship-before.png

After a database conversion, all the relationships are stored in the .INT file, but they are not propagated to the SQL database. If you examine a database diagram for the converted tables (using for example Object Explorer in Microsoft SQL Server Management Studio) you see a list of all the tables but no relationships between the tables.

ObjectExplorer-before.png

Select Synchronize the SQL Foreign Key with the INT Relationship (Synchronize.bmp in the left pane) to transfer the relationships to the SQL back-end. The right pane then shows the relationships that are created.

SyncRelationship-after.png

Once the relationships are created on the server, data modeling tools can read the data model from the database server and create a complete data model diagram.

ObjectExplorer-after.png

With the Synchronize Relationship option you can also use external tools to create database relationships and then update the .INT file using Synchronize the INT file relationship with the SQL table foreign key (Synchronize point left.bmp in the right pane).

Relationships need to be maintained in the INT file to ensure that DataFlex operates as expected. It is up to you to determine if you need relationships on the SQL side. The Mertech driver works the same with or without the relationships.

Hover the mouse over a tool icon to learn the tool’s function.

INT File Relationships

image1 Creates a foreign key on the SQL server.

image2 Deletes a relationship in the .INT file.

image3 Synchronizes the SQL foreign key with the INT relationship (can result in relationships being deleted on the SQL server)

image4 Lines up the right tree with the left key.

image5 Collapse the tree. Only the top level is visible.

image6 Expands the tree so all levels are visible.

SQL Table Foreign Keys

Create point left.bmp Creates a relationship in the .INT file.

Delete.bmp Deletes a foreign key from the SQL table.

Synchronize point left.bmp Synchronize the SQL foreign key with the INT relationship (can result in relationships being deleted in the INT file).

Collapse.bmp Collapse the tree. Only the top level is visible.

image7 Expands the tree so all levels are visible.

Note

If a relationship is missing the corresponding entry in the tree is labeled Missing and marked with a red X.