Creating SQL to Run Before and After Generating a Physical Database
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.
- In the Data Model Explorer, select a physical data model and then choose Model > Model Properties.
- Select the PreSQL & PostSQL tab.
- Enter, or copy and paste the PreSQL and PostSQL on their respective tabs.
- If you want the PreSQL and PostSQL scripts to be generated, select Generate.
- Click OK.