24.12.2012 Views

ER/Studio - Embarcadero Technologies Product Documentation

ER/Studio - Embarcadero Technologies Product Documentation

ER/Studio - Embarcadero Technologies Product Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

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

You can create a reusable function Function SQL Editor where you can create a function and bind attachments to it.<br />

You can also add a Function through the Table Editor - Dependencies tab. They are not associated with a particular<br />

table; they are stored in the database.<br />

The following database platforms support SQL functions:<br />

• IBM DB2 for LUW 5.x, 6.x, 7.x, 8.x, 9.x<br />

• Microsoft SQL Server 2000, 2005<br />

• Oracle 7.x, 8.x, 9i, 10g<br />

• Sybase ASA 6.0, 7.0, 8.0, 9.0, Adaptive Server IQ 12<br />

Add a Stored SQL Function<br />

1 In the Data Model Explorer, expand the Logical Main Model, right-click the Functions node, and then click New<br />

Function.<br />

2 Complete the Function SQL Editor and then click OK to create the function.<br />

TIP: Once you have created the function, you can edit it by right-clicking the function you want to<br />

change, and then selecting Edit Function.<br />

The following describe options that require additional explanation.<br />

Description tab<br />

Enter or edit a definition for the function. If the target database supports it, <strong>ER</strong>/<strong>Studio</strong> adds this definition as a<br />

table comment when generating SQL code.<br />

Permissions tab<br />

Sets access roles and user permissions for the function. Keep in mind that the more specific permissions are,<br />

the more time you may have to spend maintaining and updating them. The Roles and Users must be previously<br />

assigned to appear in the Function Editor. For more information, see Creating and Editing Database Roles and<br />

Creating and Editing Database Users.<br />

Attachment Bindings tab<br />

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

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

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

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

Attachments are created in the Attachments folder of the Data Dictionary. For more information, see Attaching<br />

External Documents to the Data Model.<br />

Notes<br />

• You can choose to launch your preferred SQL editor when editing functions and procedures. Using the Tools tab<br />

of the Options Editor, you can enter the name and location of the SQL editor that will launch and manage the SQL<br />

<strong>ER</strong>/<strong>Studio</strong> outputs. Click Tools > Options > Tools > ISQL Path.<br />

• For all new models you can choose:<br />

• To display the schema object description or its associated symbol, click Tools > Options > Display and then<br />

select the desired display mode.<br />

• To hide invalid schema objects, click Tools > Options > Schema Objects and then select Hide Invalid Schema<br />

Object Bitmap.<br />

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

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

Saved successfully!

Ooh no, something went wrong!