To synchronize your model and database, use Update To Database Wizard. Update To Database Wizard detects changes inside entities and generates scripts for updating the database by applying only the necessary changes while retaining data where possible. The database does not need to be re-created. The wizard displays a tree of changed objects and their changes, allowing you to choose which objects to synchronize, specify renamed objects, and more. Even changes inside an entity are detected and result in ALTER statements – the table does not need to be dropped and re-created.
To generate the update script, perform the following steps:
1. Right-click the empty space in the diagram area and select Update Database From Model, or click the
Update Database From Model button on the Model toolbar, or press CTRL+ALT+F. The first page of Update To Database Wizard is displayed.

2. Select the Regenerate Storage checkbox, if necessary.
Note
Select the Regenerate Storage checkbox to completely regenerate the entire Model Storage part and Mapping, including the description of storage columns and relationship ends.
In Telerik Data Access, all customization of column options and other mapping settings is filled automatically by the engine, which converts the Conceptual model to the Storage model and Mapping. The engine considers entities, associations, and inheritances from the Conceptual model.
When working with Telerik Data Access ORM, this option is rarely used because the Telerik Data Access runtime does not require the Storage part and Mapping. Use this option only if you want the Storage part to always be complete and automatically generated.
3. Select the Recreate Database Tables checkbox, if necessary, to drop the existing database tables and re-create them.
4. Click Next. The Set up data connection properties page of the wizard is displayed.

Note
This page is displayed only if the model was created using the Model-First approach and no connection settings were specified. The appearance of this page may differ depending on the selected provider.
5. Set up the connection parameters for your database and click Next.
Note
If the Regenerate Storage checkbox was selected in step 2, the Set up naming rules page of the wizard is displayed. Because Telerik Data Access does not require this option, it is not selected in this walkthrough, and the naming rules step is skipped.
The Choose schemas page of the wizard is displayed.

6. Select the database schemas to be compared with the model and click Next. The Choose change actions page of the wizard is displayed.

7. Select the Group by schemas checkbox to group changed database objects by schemas, if necessary.
8. Select database objects and the specific changes to synchronize. If you choose not to apply changes to some column or constraint, Entity Developer will remember it and will not offer to apply changes to that object next time – in the Choose Actions tree, the object will be deselected by default. Each node of the object tree that corresponds to a database object available for update has a remark describing the action raised between this object and the corresponding model entity. The following types of actions are available:
Added – The object is not present in the database. It will be added to the database after the wizard finishes.
Dropped – The object is not present in the model. It will be dropped from the database after the wizard finishes.
Changed – Some properties of this object differ from the corresponding database object fields. The database object field set will be changed.
Renamed – Objects in the database and in the model have different names. This type of change is not always detected automatically during the comparison of database metadata and metadata built from the model. For renamed objects to be detected, they must conform to certain rules. Metadata comparison is implemented in two steps. In the first step, equivalents are looked for with exactly the same number of columns and foreign keys, with the columns matching as well. If no equivalents are found, then similar objects are looked for using the same rules, but columns must match only by name. When identical objects are found, similar objects will not be looked for. Objects not detected as renamed automatically are displayed as a pair of dropped/created objects. Select such a pair, right-click the selection, and choose Resolve Renamed from the shortcut menu to mark the objects as renamed. To cancel renaming, right-click the object marked as Renamed and select Cancel Renaming.
Use the shortcut menu of the root nodes to select or clear all added, dropped, or changed objects.
9. Click Next. The View and execute script page of the wizard is displayed.

This page shows the action plan that will be implemented during execution. You can view the scripts on the Script tab of this wizard page.

10. Click Execute to run the displayed scripts.
11. On the final page of the wizard, click Finish.
The database and the storage model are now synchronized.