Procedure to Relate Tables

  1. Start Enterprise Manager
  2. Click + to expand SQL Server Group
  3. Click + to expand your server group
  4. Click + to expand your database
  5. Right click Diagrams, if none exits, otherwise double click diagram on right side of screen,
  6. Right click in diagram, chose Add Existing table and skip to step 8

  7. Click New Database Diagrams...
  8. Click Next>
  9. Click tables to be related
  10. Click Add button
  11. Repeat steps 8 - 9, until all tables to related have been chosen
  12. Click Next>
  13. Click Finish
  14. Click OK
  15. Click on the box in front of the foreign key column and drag it to the column in the related table
  16. (the row of foreign key will become highlighted)

  17. The Properties dialog box for the table will appear
  18. Enter relationship name in the Selected relationship box
  19. Relationship name should be primary table name _ (undersorce) foreign table name

    ex. primary table name: TCO88_WINNT_Logins

    foreign table name: TCO88_Server

    relationship name: TCO88_WINNT_Logins_TCO88_Server

  20. Verify the correct columns have been chosen for the primary and foreign key
  21. Click Close button
  22. Click the save button (small diskette)