-
Notifications
You must be signed in to change notification settings - Fork 26
hs270
Contents - Index - Previous **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 the{width="23" height="23"} BuildDatabase speed button on the toolbar of the InstantObjects ModelExplorer
{width="336" height="274"}
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.
{width="364" height="361"}
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.
{width="656" height="482"}
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.
- Home
- Glossary
- Project structure
- Installing InstantObjects
- User Guide for InstantObjects
- Creating the Business Model
- Creating the User Interface
- Programming with Persistent Objects
- Learning the Primer Demo