Frequently Asked Questions

How do I create a Database?

Firstly, you define the structure of your model classes; this is done in a single class method. Let's say you have a class Person, you'd create the definition method like this: 

addClassDefinitionTo: aClassDefinition

    aClassDefinition
        define: #surname as: String;
        define: #firstName as: String;
        define: #address as: Address;
        define: #relatives as: (OrderedCollection of: Person)

Once this is done for all your model classes, evaluating the single instruction

aReStore synchronizeAllClasses

...will create all the required tables within the database. 

If at any time you change the structure of your classes, re-evaluating synchronizeAllClasses will update the database with the new structure and automatically migrate your existing data. This powerful feature ensures that use of ReStore does not interfere with the rapid development and refactoring potential of Smalltalk.


 

© 2003 Solutions Software Ltd.

 

Home | FAQ Index | Prev | Next