ER/Studio - Embarcadero Technologies Product Documentation
ER/Studio - Embarcadero Technologies Product Documentation ER/Studio - Embarcadero Technologies Product Documentation
USING ER/STUDIO > DEVELOPING THE PHYSICAL MODEL Permissions tab Sets access roles and user permissions for the package. Keep in mind that the more specific permissions are, the more time you may have to spend maintaining and updating them. The Roles and Users must be previously assigned to appear in the Package Editor. For more information, see Creating and Editing Database Roles and Creating and Editing Database Users. Creating and Editing Materialized Query Tables A materialized query table is a table that, like a materialized view, is defined based upon the result of a query addressing one or more tables. While the query on which a view is based is run whenever the view is referenced, a materialized query table stores the query results as data that you can work with instead of the data that is in the underlying tables. Materialized query tables can significantly improve query performance, especially for complex queries. The following database platforms support Materialized Query Tables: • IBM DB2 for LUW 5.x, 6.x, 7.x, 8.x, and 9.x NOTE: The DB2 Materialized Query Table Wizard and DB2 Materialized Query Table Editor share the same options, except for Attachment Bindings options which are present only in the editor. Add a Materialized Query Table 1 In the Data Model Explorer, expand the Physical Main Model, right-click the Materialized Query Table node, and then click New Materialized Query Table. 2 Complete the DB2 Materialized Query Table Wizard and then click Finish to create the materialized query table. TIP: Once you have created the materialized query table, you can edit it by right-clicking the materialized query table you want to change, and then clicking Edit Materialized Query Table. The following describe options that require additional explanation. Name page/tab The name of the materialized query table is derived from the information entered here, in the format of owner.name where: • owner is the owner of the materialized query table. • name is the name of the materialized query table. Location page/tab • What is the table tablespace: To avoid the performance overhead created by logging changes to the data, create materialized query tables in a table space that is defined as NOT LOGGED. • Refresh Preferences: Determines when the materialized query table is update when its base tables are updated. • Query Optimization: If enabled, DB2 can consider the materialized query table in automatic query rewrite. When query optimization is enabled, DB2 is more restrictive of what can be selected in the full select for a materialized query table. SQL page/tab Enter the entire select statement for the materialized view, starting with the keyword SELECT. EMBARCADERO TECHNOLOGIES > ER/STUDIO® 8.0.3 USER GUIDE 194
USING ER/STUDIO > DEVELOPING THE PHYSICAL MODEL Definition page/tab Enter or edit a definition or description for the materialized view. If the target database supports it, ER/Studio adds this definition as a comment when generating SQL code. DDL page/tab Displays the CREATE SUMMARY TABLE AS ... (SELECT ...) statement needed to build the node group. ER/Studio uses the platform-specific parser of the model’s selected database platform to generate the materialized query table. Attachment Bindings tab Bind an external piece of information, or attachment to the materialized query table. 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. Notes • The materialized query table is not populated when first created. You must explicitly populate the materialized query table using the REFRESH TABLE statement for system-maintained materialized query tables or by using the LOAD utility, INSERT statement or the REFRESH TABLE statement for user-maintained materialized query tables. Creating and Editing Materialized Views The performance of data warehousing and decision support system tools can be significantly increased when materialized views are used. Materialized views increase the speed of queries that access many records, allowing you to query terabytes of data in seconds. A materialized view is a pre-computed table comprising aggregated or joined data from fact and possibly dimension tables which is also known as a summary or aggregate table. An example of such a pre-defined query would be the sum of sales by region for a specific period of time. The storage requirements of the pre-computed summarizations and data joins of a materialized view are small compared to the original source data. A materialized view creates a real table that can be indexed and analyzed. The following database platforms support materialized views: • Oracle 8.x, 9i, 10g, and 11g NOTE: The Oracle Materialized View Wizard and Oracle Materialized View Editor share the same options, except for PreSQL & PostSQL, Permissions, and Attachment Bindings options which are available only in the editor. Create a Materialized View 1 In the Data Model Explorer, expand the Physical Main Model, right-click the Materialized Views node, and then click New Materialized View. 2 Complete the Oracle Materialized View Wizard and then click Finish to create the materialized view. TIP: Once you have created the materialized view, you can edit it by right-clicking the materialized view you want to change, and then clicking Edit Materialized View. The following describe options that require additional explanation. EMBARCADERO TECHNOLOGIES > ER/STUDIO® 8.0.3 USER GUIDE 195
- Page 143 and 144: USING ER/STUDIO > DEVELOPING THE PH
- Page 145 and 146: USING ER/STUDIO > DEVELOPING THE PH
- Page 147 and 148: USING ER/STUDIO > DEVELOPING THE PH
- Page 149 and 150: USING ER/STUDIO > DEVELOPING THE PH
- Page 151 and 152: USING ER/STUDIO > DEVELOPING THE PH
- Page 153 and 154: USING ER/STUDIO > DEVELOPING THE PH
- Page 155 and 156: USING ER/STUDIO > DEVELOPING THE PH
- Page 157 and 158: USING ER/STUDIO > DEVELOPING THE PH
- Page 159 and 160: USING ER/STUDIO > DEVELOPING THE PH
- Page 161 and 162: USING ER/STUDIO > DEVELOPING THE PH
- Page 163 and 164: USING ER/STUDIO > DEVELOPING THE PH
- Page 165 and 166: USING ER/STUDIO > DEVELOPING THE PH
- Page 167 and 168: USING ER/STUDIO > DEVELOPING THE PH
- Page 169 and 170: USING ER/STUDIO > DEVELOPING THE PH
- Page 171 and 172: USING ER/STUDIO > DEVELOPING THE PH
- Page 173 and 174: USING ER/STUDIO > DEVELOPING THE PH
- Page 175 and 176: USING ER/STUDIO > DEVELOPING THE PH
- Page 177 and 178: USING ER/STUDIO > DEVELOPING THE PH
- Page 179 and 180: USING ER/STUDIO > DEVELOPING THE PH
- Page 181 and 182: USING ER/STUDIO > DEVELOPING THE PH
- Page 183 and 184: USING ER/STUDIO > DEVELOPING THE PH
- Page 185 and 186: USING ER/STUDIO > DEVELOPING THE PH
- Page 187 and 188: USING ER/STUDIO > DEVELOPING THE PH
- Page 189 and 190: USING ER/STUDIO > DEVELOPING THE PH
- Page 191 and 192: USING ER/STUDIO > DEVELOPING THE PH
- Page 193: USING ER/STUDIO > DEVELOPING THE PH
- Page 197 and 198: USING ER/STUDIO > DEVELOPING THE PH
- Page 199 and 200: USING ER/STUDIO > DEVELOPING THE PH
- Page 201 and 202: USING ER/STUDIO > DEVELOPING THE PH
- Page 203 and 204: USING ER/STUDIO > DEVELOPING THE PH
- Page 205 and 206: USING ER/STUDIO > DEVELOPING THE PH
- Page 207 and 208: USING ER/STUDIO > DEVELOPING THE PH
- Page 209 and 210: USING ER/STUDIO > DEVELOPING THE PH
- Page 211 and 212: USING ER/STUDIO > DEVELOPING THE PH
- Page 213 and 214: USING ER/STUDIO > DEVELOPING THE PH
- Page 215 and 216: USING ER/STUDIO > DEVELOPING THE PH
- Page 217 and 218: USING ER/STUDIO > DEVELOPING THE PH
- Page 219 and 220: USING ER/STUDIO > DEVELOPING THE PH
- Page 221 and 222: USING ER/STUDIO > WORKING WITH THE
- Page 223 and 224: USING ER/STUDIO > WORKING WITH THE
- Page 225 and 226: USING ER/STUDIO > WORKING WITH THE
- Page 227 and 228: USING ER/STUDIO > WORKING WITH THE
- Page 229 and 230: USING ER/STUDIO > WORKING WITH THE
- Page 231 and 232: USING ER/STUDIO > WORKING WITH THE
- Page 233 and 234: USING ER/STUDIO > WORKING WITH THE
- Page 235 and 236: USING ER/STUDIO > WORKING WITH THE
- Page 237 and 238: USING ER/STUDIO > WORKING WITH THE
- Page 239 and 240: USING ER/STUDIO > WORKING WITH THE
- Page 241 and 242: USING ER/STUDIO > DOCUMENTING DATA
- Page 243 and 244: USING ER/STUDIO > DOCUMENTING DATA
USING <strong>ER</strong>/STUDIO > DEVELOPING THE PHYSICAL MODEL<br />
Permissions tab<br />
Sets access roles and user permissions for the package. 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 Package Editor. For more information, see Creating and Editing Database Roles and<br />
Creating and Editing Database Users.<br />
Creating and Editing Materialized Query Tables<br />
A materialized query table is a table that, like a materialized view, is defined based upon the result of a query<br />
addressing one or more tables. While the query on which a view is based is run whenever the view is referenced, a<br />
materialized query table stores the query results as data that you can work with instead of the data that is in the<br />
underlying tables.<br />
Materialized query tables can significantly improve query performance, especially for complex queries.<br />
The following database platforms support Materialized Query Tables:<br />
• IBM DB2 for LUW 5.x, 6.x, 7.x, 8.x, and 9.x<br />
NOTE: The DB2 Materialized Query Table Wizard and DB2 Materialized Query Table Editor share the<br />
same options, except for Attachment Bindings options which are present only in the editor.<br />
Add a Materialized Query Table<br />
1 In the Data Model Explorer, expand the Physical Main Model, right-click the Materialized Query Table node,<br />
and then click New Materialized Query Table.<br />
2 Complete the DB2 Materialized Query Table Wizard and then click Finish to create the materialized query<br />
table.<br />
TIP: Once you have created the materialized query table, you can edit it by right-clicking the<br />
materialized query table you want to change, and then clicking Edit Materialized Query Table.<br />
The following describe options that require additional explanation.<br />
Name page/tab<br />
The name of the materialized query table is derived from the information entered here, in the format of<br />
owner.name where:<br />
• owner is the owner of the materialized query table.<br />
• name is the name of the materialized query table.<br />
Location page/tab<br />
• What is the table tablespace: To avoid the performance overhead created by logging changes to the data,<br />
create materialized query tables in a table space that is defined as NOT LOGGED.<br />
• Refresh Preferences: Determines when the materialized query table is update when its base tables are<br />
updated.<br />
• Query Optimization: If enabled, DB2 can consider the materialized query table in automatic query rewrite. When<br />
query optimization is enabled, DB2 is more restrictive of what can be selected in the full select for a materialized<br />
query table.<br />
SQL page/tab<br />
Enter the entire select statement for the materialized view, starting with the keyword SELECT.<br />
EMBARCAD<strong>ER</strong>O TECHNOLOGIES > <strong>ER</strong>/STUDIO® 8.0.3 US<strong>ER</strong> GUIDE 194