Add tables to a database diagram or database (ADP)

Microsoft Office Access 2003

Adding a new table to the database diagram means that you are defining a new table that does not already exist in the database. To create a new table, you must define the individual columns that make up the table. The table is created in the database when you save the table or the database diagram.

  1. In the Database window, click Database Diagrams Button image under Objects, click the database diagram you want to open, and then click Design on the Database window toolbar.

    To create a table in your current diagram, click New Table on the Insert menu.

    –or–

    Right-click in the diagram and select New Table.

  2. To create a table in your current diagram, click New Table on the Insert menu.

    –or–

    Right-click in the diagram and select New Table.

  3. Modify or accept the system-assigned table name, in the Choose Name dialog box, and then choose OK.
    A new table appears in the diagram in column properties view.
  4. In the first cell of the new table, type a column name. Then press the TAB key to move to the next cell.
  5. Under Data Type, select a data type for the column. Each column must have a name and data type.
    You can set the column’s other properties, such as Scale, by using the Columns property page.
  6. Repeat steps 3 and 4 for each column you want to add to the table.

When you save your database diagram, the new table will be added to your database.

Note   If you create a new table, then remove it from the database diagram before saving it to the database, the table name remains in memory until you close the database diagram. Also, if you delete an existing table from the database, the table name remains in memory. To use the table name again, close and restart the Database Designer.

ShowAdd existing tables to a database diagram

Adding an existing table means that the table you want to appear in your diagram already exists in your database. If you add a group of tables to a diagram, any relationships that exist between the tables are also added to the diagram.

  1. Right click on the database diagram, and then click Add Table Button image .

  2. Select the table you want in the Tables list, and then click Add.

  3. Repeat step 2 for each additional table you want to add.

  4. Click Close.

If relationships exist between the selected table and other tables in your database diagram, relationship lines are automatically drawn.

When you add a table to a database diagram, the definition of the table (not the data that is stored in the table) is loaded from your database into memory. At that point you can edit the table’s definition. For example, you can add new columns or modify its indexes, key, relationships, or constraints.

ShowAdd related tables to a database diagram

For tables with existing foreign key constraints, you can easily add the related tables to the database diagram.

  1. Select one or more tables with foreign key constraints in the database diagram.
  2. Right-click on any of the selected tables and choose Add Related Tables.

Both those tables referenced by a foreign key constraint from the selected table(s) and those referencing the selected table(s) with a foreign key constraint are added to the database diagram.