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 PHYSICAL MODEL Attachment Bindings tab Bind an external piece of information, or attachment to the buffer pool. 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. For more information, see Attaching External Documents to the Data Model. Creating and Editing DataBases Databases are DB2 structures such as collections of tables with associated indexes, as well as the tablespaces and index spaces that contain them. Using databases for administration, you can limit access to the data in the database in one operation, or give authorization to access the data as a single unit. When you create a database the following tasks are performed: • System catalog tables required by the database are setup. • The database recovery log is allocated. • The database configuration file is created and the default values are set. • The database utilities are bound to the database. Before creating the database, ensure you have considered the contents, layout, potential growth and usage. The following database platforms support database creation: • IBM DB2 for OS/390 5.x and 6.x • IBM DB2 for z/OS 7.x, 8.x, and 9 NOTE: The Database Wizard and Database Editor share the same options, except for Attachment Bindings options which are present only in the editor. Add a Database 1 In the Data Model Explorer, expand a physical model, right-click the Databases node, and then click New Database. 2 Complete the Database Wizard and then click Finish to create the database. TIP: Once you have created the auxiliary table, you can edit it by right-clicking the auxiliary table you want to change, and then clicking Edit Auxiliary Table. The following describe options that require additional explanation: Name & Type page/tab Name the database and specify the type. The database cannot already exist on the current server. The name must not start with DSNDB, unless it is a workfile database and must not start with DSN followed by five digits. Select WorkFile Database (AS WORKFILE) if the database operates in a data sharing environment and you are creating a database that will be used for purposes such as managing the data of temporary tables, storing intermediate SQL results, created global and temporary tables. If you choose to create a WorkFile Database, you must also specify the member or DB2 subsystem that can use the workfile. Only one member of the data sharing group can use this workfile. Option page/tab To make the database easier to manager, keep work files in a separate buffer pool. EMBARCADERO TECHNOLOGIES > ER/STUDIO® 8.0.3 USER GUIDE 180

USING ER/STUDIO > DEVELOPING THE PHYSICAL MODEL • Tablespace and index buffer pools: (BUFFERPOOL and INDEXBP) Identifies the buffer pools to be used. The buffer pool used determines how the datablocks are cached in memory, in order to facilitate faster data access. BP0 is the default buffer pool for sorting. • Storage Group: (STOGROUP) If selected, stores the index on a data set managed by DB2 in the named storage group. Stogroup defined index spaces let DB2 do all the VSAM allocation work for you. If you have created a Stogroup for the data model, using the Stogroup Editor (see Creating and Editing StoGroups), you can select that Stogroup from the list. If you select Stogroup, you can also define values for PRIQTY and SECQTY. To prevent wasted space for non-partitioned indexes, you should not define PRIQTY and SECQTY; instead let DB2 manage the amount of primary and secondary space allocated for the index. • Encoding Scheme: (CCSID) Specifies the encoding scheme: ASCII, EBCDIC, UNICODE or the system installed default. This is not valid if this database is to be used as a work file in a data sharing environment. If you do not want to use the default encoding scheme that was selected when you installed DB2 for OS/390 and z/OS, you can override your installation selection here. You cannot specify an encoding scheme for a workfile database. Definition page/tab Enter or edit a definition for the database. If the target database supports it, ER/Studio adds this definition as a comment when generating SQL code. DDL page/tab Displays the CREATE DATABASE statement needed to build the database. ER/Studio uses the platform-specific parser of the model’s selected database platform to generate the database. Attachment Bindings tab Bind an external piece of information, or attachment to the data base. 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. For more information, see Attaching External Documents to the Data Model. Creating and Editing SQL Procedures SQL procedures are reusable blocks of PL/SQL that you create, which are stored in the database. Applications can call procedures to streamline code development, debugging, and maintenance. Procedures can also enhance database security by letting you write procedures granting users execution privileges to tables rather than letting them access tables directly. Stored procedures can contain program flow, logic, and database queries. They can accept and generate parameters, return single or multiple result sets, and return values. In addition to doing anything that can be accomplished with SQL statements, stored procedures can also: • Execute a series of SQL statements in a single stored procedure. • Reference other stored procedures, which can simplify a series of complex statements. • Execute faster than individual SQL statements because the stored procedure is compiled on the server when it is created. • Be cached in memory, for faster execution. There are several ways that you can implement SQL procedures: • SQL that runs before or after creating an object. For more information, see Creating and Editing PreSQL and PostSQL for the CREATE TABLE Statement EMBARCADERO TECHNOLOGIES > ER/STUDIO® 8.0.3 USER GUIDE 181

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

Attachment Bindings tab<br />

Bind an external piece of information, or attachment to the buffer pool. 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. For more information, see<br />

Attaching External Documents to the Data Model.<br />

Creating and Editing DataBases<br />

Databases are DB2 structures such as collections of tables with associated indexes, as well as the tablespaces and<br />

index spaces that contain them. Using databases for administration, you can limit access to the data in the database<br />

in one operation, or give authorization to access the data as a single unit.<br />

When you create a database the following tasks are performed:<br />

• System catalog tables required by the database are setup.<br />

• The database recovery log is allocated.<br />

• The database configuration file is created and the default values are set.<br />

• The database utilities are bound to the database.<br />

Before creating the database, ensure you have considered the contents, layout, potential growth and usage.<br />

The following database platforms support database creation:<br />

• IBM DB2 for OS/390 5.x and 6.x<br />

• IBM DB2 for z/OS 7.x, 8.x, and 9<br />

NOTE: The Database Wizard and Database Editor share the same options, except for Attachment<br />

Bindings options which are present only in the editor.<br />

Add a Database<br />

1 In the Data Model Explorer, expand a physical model, right-click the Databases node, and then click New<br />

Database.<br />

2 Complete the Database Wizard and then click Finish to create the database.<br />

TIP: Once you have created the auxiliary table, you can edit it by right-clicking the auxiliary table you<br />

want to change, and then clicking Edit Auxiliary Table.<br />

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

Name & Type page/tab<br />

Name the database and specify the type. The database cannot already exist on the current server. The name<br />

must not start with DSNDB, unless it is a workfile database and must not start with DSN followed by five digits.<br />

Select WorkFile Database (AS WORKFILE) if the database operates in a data sharing environment and you are<br />

creating a database that will be used for purposes such as managing the data of temporary tables, storing<br />

intermediate SQL results, created global and temporary tables. If you choose to create a WorkFile Database,<br />

you must also specify the member or DB2 subsystem that can use the workfile. Only one member of the data<br />

sharing group can use this workfile.<br />

Option page/tab<br />

To make the database easier to manager, keep work files in a separate buffer pool.<br />

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

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

Saved successfully!

Ooh no, something went wrong!