Skip to content
Carlo Barazzetta edited this page Dec 4, 2018 · 7 revisions

**Building/Evolving the Business Model **

The final step in the modeling phase is to make the model physical in terms of storage for the objects. The required tables and indices have to be created from the business model. InstantObjects allows the use of various types of databases as storage for the business class objects by using different brokers.

The Connection Manager manages the definition, creation and evolution of the database. It can be launched using theBuildDatabase speed button on the toolbar of the InstantObjects ModelExplorer

Defining a Broker Connection The first step in preparing the database is to define a connector using a specific broker to establish a connection to the database. Click the right mouse button over the Connection Manager dialog and select New in the pop-up context menu. Choose the preferred Broker and its ConnectionDef Editor appears. The contents of the ConnectionDefEditor varies depending on the requirements of its related broker. The example image below is for the Interbase/Firebird IBX broker.

Define the connection properties and save the connection definition. Repeat this procedure for any other broker connections required.

Building the Database for a Model WARNING: Any existing data in the database will be destroyed during the build process! Select the desired Broker Connection in the Connection Manager then to Build its database click the Build button. The Database Builder dialog appears. Click on the Show Build Sequence button and the Evolution Sequence pane will display the sequence of commands that will be executed during the actual build process. The individual steps can be disabled, enabled and re-ordered as desired using the check boxes on the left of each step in the sequence and the buttons on the right of the dialog. When the desired sequence is ready, click the Build Database button to execute it. The build progress and results are reported in the Evolution Log pane. 

Evolving an Existing Database for a Modified Model If the database for a model has been built and populated with data,subsequent changes to the model requiring a database restructure can be accommodated within the InstantObjects framework by Evolving the database. Unlike the Build procedure, which will destroy and recreate all database tables, the evolution process will try to save the existing data. The effectiveness of the evolution process depends on the features of the particular kind of database you are using. WARNING: While the InstantObjects evolution process will attempt topreserve existing data, success is NOT guaranteed! It is stronglyrecommended that a verified back up of the database is available beforethis evolution process is applied. To evolve an existing database, select the desired Broker Connection andclick the Evolve button. The Database Evolver dialog similar to theDatabase Builder dialog will appear. Click on the Show EvolutionSequence button and the Evolution Sequence pane will display thesequence of commands that will be executed during the actual evolveprocess. The individual steps can be disabled, enabled and re-ordered asdesired using the check boxes on the left of each step in the sequenceand the buttons on the right of the dialog. When the desired sequence isready, click the Evolve Database button to execute it. The evolveprogress and results are reported in the Evolution Log pane.

Clone this wiki locally