13.01.2013 Views

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Managing server attributes<br />

6. The Parent Table/Parent Index lists the indexes from all of the other tables<br />

defined in the <strong>OpenEdge</strong> database, available <strong>for</strong> selection. For the <strong>Data</strong><strong>Server</strong> <strong>for</strong><br />

MS <strong>SQL</strong> <strong>Server</strong>, the list shows primary and unique indexes. Below the parent<br />

index in<strong>for</strong>mation is the Child Index list. The Child Index list shows the available<br />

indexes <strong>for</strong> the selected table. For both parent and child indexes, the Index Key<br />

Composite Fields shows the columns that comprise the indexes. Select an index<br />

from the parent and child lists with matching composite fields.<br />

7. By default, the <strong>for</strong>eign key constraint definition has the Active check box selected.<br />

Leave this box selected if you want the constraint definition you are defining to be<br />

available <strong>for</strong> migration.<br />

8. Select an appropriate action item from the Constraint Action.<br />

Constraint actions can be NONE, CASCADE, SET NULL, or SET DEFAULT. A<br />

typical constraint definition action ensures that the data integrity, in case you need<br />

to delete data in the rows of a referenced table.<br />

The NONE constraint action ensures data is not deleted from a row which exists<br />

in a <strong>for</strong>eign key table that references the value in the referenced table.<br />

The CASCADE constraint action ensures that whenever you delete rows in the<br />

master (referenced) table, the respective rows of the child (referencing) table with<br />

a matching <strong>for</strong>eign key column is deleted.<br />

The SET NULL constraint action ensures that the <strong>for</strong>eign key values in the<br />

referencing row are set to NULL when the referenced row is deleted.<br />

The SET DEFAULT constraint action ensures that <strong>for</strong>eign key values in the<br />

referencing row are set to the column default when the referenced row is deleted.<br />

9. Add a description of the constraint definition in the Description fill-in, if desired.<br />

10. Click OK to save the constraint definition and exit the dialog box. Click Create to<br />

save the constraint definition and remain in the dialog box and continue defining<br />

constraint definitions <strong>for</strong> the selected table.<br />

Defining a check constraint definition<br />

A check constraint definition is a server-side validation. The following steps<br />

demonstrate how to define a check constraint definition.<br />

To define a check constraint definition:<br />

1. Start <strong>Data</strong> Administration and connect to the <strong>OpenEdge</strong> database you are<br />

migrating.<br />

2. Select <strong>Data</strong><strong>Server</strong>→ MS <strong>SQL</strong> <strong>Server</strong> Utilities→ <strong>Server</strong> Attributes→<br />

View/Maintain Foreign Constraints. The View/Maintain Foreign Constraint<br />

Definitions dialog box appears.<br />

3. Select the table <strong>for</strong> which you are defining a check constraint definition and click<br />

Create Constraints. The Create Foreign Constraint Definitions <strong>for</strong> tablename<br />

dialog box appears, as shown in Figure 16.<br />

<strong>OpenEdge</strong> <strong>Data</strong> <strong>Management</strong>: <strong>Data</strong><strong>Server</strong> <strong>for</strong> <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong> 285

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!