ComponentOne DataObjects for .NET
Importing Database Structure
DataObjects for .NET (Enterprise Edition) > Schema Objects > Importing Database Structure

The DataObjects Schema Designer provides an Import Wizard that creates a schema based on the structure information stored in a database. It creates simple tables based on database tables, and simple relations between them based on foreign key constraints stored in the database. Tables are created with fields according to the field structure of the database tables. Field properties, such as DataType, PrimaryKey and others are set according to the database field properties. Later, you can customize table fields, change their properties, delete unnecessary fields, change the fields order, and add new fields, not necessarily based on database table fields.

Importing the database structure also creates a database connection (in the Connections window of the Schema Designer), that you can use later to connect to the database while editing the schema. For more information on importing a database structure, see Creating a Schema with the Import Wizard.

After you have imported the database structure, you can modify the schema, add tables (simple and composite), create relations, and so on. After import, the Schema Designer is connected to the database, so the Database Tables window is filled with the list of all database tables with their fields; this is highlighted in the image below:


To connect to the database, select Connect to database in the Schema menu, specify the connection and optional parameters in the Connect to database dialog box, and click OK.


Note: It is not necessary to be connected to the database in order to work in the Schema Designer, although a live connection has some advantages. For example, if the designer is connected to the database, the DbTableName property of a table and the DbFieldName property of a field show the lists of available tables and fields, respectively. Also, in connected mode, it is possible to create schema tables by a drag-and-drop operation from the Schema graph window.