Creating SQL to Run Before and After Generating a Physical Database

From ER/Studio Data Architect
Jump to: navigation, search

Go Up to Using ER/Studio Data Architect

You can create PreSQL and PostSQL procedures that ER/Studio Data Architect runs before generating a physical database from the physical model when you choose the Database > Generate Database command and then click Finish in the wizard. Using the PreSQL and PostSQ of the Emergency Admissions sample model as an example, you can create users and assign them specific permissions before generating the database and then create a materialized view, after generating the database.

  1. In the Data Model Explorer, select a physical data model and then choose Model > Model Properties.
  2. Select the PreSQL & PostSQL tab.
  3. Enter, or copy and paste the PreSQL and PostSQL on their respective tabs.
  4. If you want the PreSQL and PostSQL scripts to be generated, select Generate.
  5. Click OK.

See Also