4.5 Editing Tables

4.5.1 Column Editor
4.5.2 Editing Indexes
4.5.3 Editing Foreign Keys
4.5.4 Column Properties
4.5.5 Table Properties

Connector/Net contains a table editor, which enables the visual creation and modification of tables.

The Table Designer can be accessed through a mouse action on table-type node of Server Explorer. To create a new table, right-click the Tables node (under the connection node) and choose the Create Table command from the context menu.

To modify an existing table, double-click the node of the table to modify, or right-click this node and choose the Design item from the context menu. Either of the commands opens the Table Designer.

Figure 4.7 Editing New Table

Editing New Table

Table Designer consists of the following parts:

Each of these areas is discussed in more detail in subsequent sections.

To save changes you have made in the Table Designer, press either Save or Save All on the Visual Studio main toolbar, or press Control + S. If you have not already named the table, you will be prompted to do so.

Figure 4.8 Choose Table Name

Choose Table Name

Once the table is created, you can view it in the Server Explorer.

Figure 4.9 Newly Created Table

Newly Created Table

The Table Designer main menu lets you set a primary key column, edit relationships such as foreign keys, and create indexes.

Figure 4.10 Table Designer Main Menu

Table Designer Main Menu