ER/Studio - Embarcadero Technologies Product Documentation

ER/Studio - Embarcadero Technologies Product Documentation ER/Studio - Embarcadero Technologies Product Documentation

docs.embarcadero.com
from docs.embarcadero.com More from this publisher
24.12.2012 Views

USING ER/STUDIO > DEVELOPING THE LOGICAL MODEL Phrases tab • Verb Phrase: Describes the relationship of the Parent table to the Child table. • Inverse Verb Phrase: Describes the relationship of the Child table to the Parent table. Name tab • Business Name: Identifies the relationship for business documentation purposes. • Constraint Name: Names the referential constraint the relationship enforces between parent and child tables, if any. ER/Studio uses this name as the foreign key constraint name when generating DDL. Trigger tab Select a trigger to maintain referential integrity for INSERT, UPDATE, and DELETE operations on child and parent objects. Select one of the following triggers for each operation. • Restrict: Verifies the existence of foreign key values in the object’s primary key and prevents the insertion, updating, or deleting of data if the values cannot be validated. • Cascade: Propagates any modification of a primary key value to the corresponding foreign key values in the child table. • Set Null: Verifies the existence of the foreign key values in the parent table’s primary key. If the values cannot be validated, the trigger sets the foreign key values to null in the child table and lets the data modification operation proceed. For more information, see Creating and Editing Database Schemas. Definition tab Enter or edit a definition for the relationship. If the target database supports it, ER/Studio adds this definition as a comment when generating SQL code. Compare Options tab Note tab Identifying Relationship Non-Identifying Relationship Optional Mandatory One to Zero or One Zero or One to Zero or One (Z) One to Zero or One (Z) One to Exactly: N Zero or One to Exactly: N One to Exactly: N Allows you to choose which properties of the attribute will be ignored when using the Compare and Merge, thus allowing you to have intentional discrepancies. The notes added here are included as part of the HTML report when you generate a report for the model. You can format the notes using standard HTML tags. EMBARCADERO TECHNOLOGIES > ER/STUDIO® 8.0.3 USER GUIDE 134

USING ER/STUDIO > DEVELOPING THE LOGICAL MODEL Rolename tab You can change the rolename of foreign keys to differentiate between child and parent attributes in the event that overlapping foreign keys exist. To change a rolename, double-click any of the rows to invoke the Foreign Key dialog. You can also change logical and default column rolenames through the Columns tab of the Table Editor or by right-clicking the relationship and selecting Edit RoleName. Attachment Bindings tab Bind an external piece of information, or attachment to the relationship. You can also remove an attachment from an object, override an attachment binding’s default value, or change the position of a bound attachment. To override the value of the attachment you have moved to the Selected Attachments grid, double-click the Value field of the target attachment. ER/Studio opens the Value Override Editor or a list depending on the attachment datatype. Attachments are created in the Attachments folder of the Data Dictionary and must be applied to the relationship before they will display on this tab. For more information, see Attaching External Documents to the Data Model. Notes • You can view the incoming and outgoing relationships of a table by expanding the relevant table node and then expanding Incoming Relationships or Outgoing Relationships. Expand the relationship node to see the name of the related table. • You can change the relationship type, specify cardinality, create verb phrases to describe the relationship, create a logical business and constraint name, and define triggers by double-clicking the relationship, and then making your changes in the Relationship Editor. • You can delete a relationship by right-clicking it in the Data Model Window and then selecting Delete Relationship. • You can edit a relationship by right-clicking the relationship in the Data Model Window and then selecting Edit Relationship for a logical model or Edit Foreign Key for a physical model. • Changing relationship types causes ER/Studio to re-propagate foreign keys using the following rules: • When changing from identifying to non-identifying, foreign keys change from primary keys to non-key columns in the child object. • When changing from identifying to non-specific, or from non-identifying to non-specific, the foreign keys are removed from the child object. • When changing from non-identifying to identifying, the foreign keys change from non-key to primary key columns or attributes in the child object. • When changing from non-specific to identifying, the child object inherits the parent object’s primary keys as primary key columns or attributes. • When changing from non-specific to non-identifying, the child object inherits the parent table’s primary keys as non-key columns or attributes. • You can configure how ER/Studio displays relationships for the selected model by clicking View > Diagram and Object Display Options Editor > Relationship and then making your changes. • You cannot edit a View Relationship (see Creating View Relationships). See Also Moving Relationship Docking Points Setting the Relationship Notation Manipulating Relationship Lines Overriding Color and Font Settings for a Specific Object EMBARCADERO TECHNOLOGIES > ER/STUDIO® 8.0.3 USER GUIDE 135

USING <strong>ER</strong>/STUDIO > DEVELOPING THE LOGICAL MODEL<br />

Rolename tab<br />

You can change the rolename of foreign keys to differentiate between child and parent attributes in the event that<br />

overlapping foreign keys exist. To change a rolename, double-click any of the rows to invoke the Foreign Key<br />

dialog. You can also change logical and default column rolenames through the Columns tab of the Table Editor<br />

or by right-clicking the relationship and selecting Edit RoleName.<br />

Attachment Bindings tab<br />

Bind an external piece of information, or attachment to the relationship. You can also remove an attachment from<br />

an object, override an attachment binding’s default value, or change the position of a bound attachment. To<br />

override the value of the attachment you have moved to the Selected Attachments grid, double-click the Value<br />

field of the target attachment. <strong>ER</strong>/<strong>Studio</strong> opens the Value Override Editor or a list depending on the attachment<br />

datatype. Attachments are created in the Attachments folder of the Data Dictionary and must be applied to the<br />

relationship before they will display on this tab. For more information, see Attaching External Documents to the<br />

Data Model.<br />

Notes<br />

• You can view the incoming and outgoing relationships of a table by expanding the relevant table node and then<br />

expanding Incoming Relationships or Outgoing Relationships. Expand the relationship node to see the name of<br />

the related table.<br />

• You can change the relationship type, specify cardinality, create verb phrases to describe the relationship, create<br />

a logical business and constraint name, and define triggers by double-clicking the relationship, and then making<br />

your changes in the Relationship Editor.<br />

• You can delete a relationship by right-clicking it in the Data Model Window and then selecting Delete<br />

Relationship.<br />

• You can edit a relationship by right-clicking the relationship in the Data Model Window and then selecting Edit<br />

Relationship for a logical model or Edit Foreign Key for a physical model.<br />

• Changing relationship types causes <strong>ER</strong>/<strong>Studio</strong> to re-propagate foreign keys using the following rules:<br />

• When changing from identifying to non-identifying, foreign keys change from primary keys to non-key columns<br />

in the child object.<br />

• When changing from identifying to non-specific, or from non-identifying to non-specific, the foreign keys are<br />

removed from the child object.<br />

• When changing from non-identifying to identifying, the foreign keys change from non-key to primary key<br />

columns or attributes in the child object.<br />

• When changing from non-specific to identifying, the child object inherits the parent object’s primary keys as<br />

primary key columns or attributes.<br />

• When changing from non-specific to non-identifying, the child object inherits the parent table’s primary keys as<br />

non-key columns or attributes.<br />

• You can configure how <strong>ER</strong>/<strong>Studio</strong> displays relationships for the selected model by clicking View > Diagram and<br />

Object Display Options Editor > Relationship and then making your changes.<br />

• You cannot edit a View Relationship (see Creating View Relationships).<br />

See Also<br />

Moving Relationship Docking Points<br />

Setting the Relationship Notation<br />

Manipulating Relationship Lines<br />

Overriding Color and Font Settings for a Specific Object<br />

EMBARCAD<strong>ER</strong>O TECHNOLOGIES > <strong>ER</strong>/STUDIO® 8.0.3 US<strong>ER</strong> GUIDE 135

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

Saved successfully!

Ooh no, something went wrong!