Add The Services Table To The Relationships Window

10 min read

You're staring at the Relationships window. But something's missing — the Services table. The lines are drawn. The tables are there. Consider this: you know it exists. You built it. So why isn't it showing up?

This happens more often than you'd think.

What Is the Relationships Window

The Relationships window is where your database schema becomes visible. It's not just a diagram — it's the place where referential integrity lives, where cascade deletes get configured, and where you actually see how your data connects.

In Access, it's under Database Tools. Other tools call it an ER diagram or schema visualizer. So in SQL Server Management Studio, it's a Database Diagram. Same idea: drag tables in, draw lines between matching fields, enforce rules That alone is useful..

The Services table is just another table. But if it's not in the window, you can't relate it to anything. Consider this: no foreign keys. This leads to no cascade options. No visual proof that your appointments link to services, or your invoices reference service IDs And that's really what it comes down to..

Why the Services Table Might Be Missing

A few common reasons:

  • It was created after the diagram was last saved
  • It lives in a different schema (dbo vs. custom)
  • It's a system table or view, filtered out by default
  • The diagram hasn't been refreshed
  • You're looking at an outdated diagram version

None of these are bugs. They're just how the tools work And it works..

Why It Matters

You can write queries without the Relationships window. You can build forms, reports, even entire applications. But you're flying blind on integrity Worth keeping that in mind..

Add the Services table, and suddenly you can:

  • Enforce that every Appointment references a valid ServiceID
  • Cascade delete services when they're retired — or prevent deletion if appointments exist
  • See the full picture: Customers → Appointments → Services → Providers
  • Document the schema for the next developer (or yourself in six months)

Skip it, and you're relying on application-layer validation. That said, that works until someone runs a raw DELETE statement. On the flip side, or imports bad data. Or the intern writes a script at 4:55 PM on Friday That alone is useful..

Real talk: the Relationships window is the only place the database itself enforces your rules. Everything else is hope.

How to Add the Services Table

The steps depend on your tool. Here's the breakdown for the most common ones.

In Microsoft Access

Open the database. Go to Database Tools → Relationships. If the window is empty or missing tables:

  1. Right-click anywhere in the white space → Show Table
  2. In the dialog, click the Tables tab (not Queries, not Both)
  3. Scroll to find Services — if it's not there, check:
    • Is it a linked table? Linked tables show a small arrow icon
    • Is it hidden? Right-click the Navigation Pane → Navigation Options → uncheck "Show Hidden Objects"
    • Was it created in code? Compact & Repair, then reopen
  4. Select Services → AddClose
  5. Drag ServiceID from Services to ServiceID in Appointments (or whatever table references it)
  6. Check Enforce Referential Integrity — decide on Cascade Update/Delete
  7. Create → save the diagram

Pro tip: Access only saves one Relationships layout per database. If you have multiple diagrams, you're out of luck — unless you use third-party tools.

In SQL Server Management Studio (SSMS)

SSMS uses Database Diagrams, not a single Relationships window.

  1. Expand your database → right-click Database DiagramsNew Database Diagram
  2. If prompted about missing support objects, say Yes
  3. In the Add Table dialog, find Services — if missing:
    • Check the schema dropdown (default is dbo, but yours might be app, core, svc)
    • Click Refresh (circular arrow icon) if the table was just created
    • Verify you have SELECT permission on the table
  4. Add Services + any related tables → Add
  5. Drag columns to create relationships — SSMS opens a Foreign Key Relationship dialog
  6. Set Check Existing Data on Creation = Yes (validates current rows)
  7. Save the diagram with a meaningful name: Core_Scheduling_Relationships

Note: Diagrams live in sysdiagrams table. They're per-database, per-user by default. Share them by granting access or exporting as image/PDF Not complicated — just consistent..

In Azure Data Studio / VS Code (mssql extension)

  1. Connect to your database
  2. Right-click the database → ManageDatabase Diagrams (or use the ER Diagram extension)
  3. Search for "Services" in the table list — filter by schema if needed
  4. Drag to canvas → auto-arrange → save as .diagram file or export

These tools are newer. And they're better at handling large schemas, but sometimes miss tables created outside the current session. Refresh the connection.

In MySQL Workbench

  1. Database → Reverse Engineer → connect → select schema → next
  2. On the Select Objects screen, ensure Tables includes services
  3. If missing: check Show Filter → type %services% → verify it's not excluded
  4. Continue → Place Objects on Diagram → arrange → save as .mwb model file

Workbench models are separate from the live database. You're editing a model, not the server. Forward-engineer to apply changes.

In pgAdmin (PostgreSQL)

pgAdmin doesn't have a built-in diagram tool. Use:

  • ERD Tool (right-click database → ERD Tool) — auto-generates from catalog
  • Or external tools: DBeaver, DataGrip, dbdiagram.io, pgModeler

In the ERD Tool, if Services is missing:

  • Check the Filter panel → ensure schema public (or yours) is selected
  • Click Refresh (top toolbar)
  • Verify the table isn't a partition, foreign table, or view masquerading as a table

Common Mistakes

Assuming the Diagram Auto-Updates

It doesn't. Not in Access. Consider this: not in SSMS. Not in Workbench. So you add a table → you must add it to the diagram. Every time That's the part that actually makes a difference..

I've seen teams run for months with outdated diagrams. The schema evolved. On top of that, the diagram didn't. Then someone wonders why their cascade delete "isn't working" — because the relationship was never drawn in the current diagram version.

Adding the Wrong Services Table

You have dbo.Services, staging.On top of that, services, archive. Services. Think about it: maybe a Services view. Even so, the dialog shows all of them. Pick the wrong one, and your relationships point to stale data — or nothing at all.

Always verify the schema and row count before adding Easy to understand, harder to ignore..

Forgetting to Save the Diagram

Access prompts on close. Different mental model. Also, sSMS prompts on close. You save the model file, not the database. Workbench? Don't lose work.

Drawing Relationships on the Wrong Columns

ServiceID → ServiceID seems obvious. But what if the referencing column is SvcID? Or Service_Code? Or a composite key (TenantID, ServiceID)?

Check the actual column names. Worth adding: sp_help 'Appointments' or DESCRIBE appointments. Don't guess.

Ign

Keeping Diagrams in Sync with Schema Changes

  1. Treat the diagram as a living artifact – every time you run a migration script (ALTER TABLE, CREATE TABLE, DROP TABLE, or a data‑definition language change) open the diagram file, verify that the new objects appear, and add any missing tables or relationships before committing the change.
  2. Automate the refresh – many IDEs let you hook a “pre‑commit” script that runs a reverse‑engineer command and overwrites the diagram file. In SSMS you can call sp_helpdiagramdefinition from a PowerShell step; in Workbench you can invoke the command‑line mysqlworkbench --run-script to regenerate the .mwb. This guarantees that the diagram never lags behind the source‑controlled schema.
  3. Version‑control the diagram file – store .diagram, .mwb, .erd, or exported PNG/SVG files alongside your migration scripts in Git. When a teammate pulls a branch, they instantly see the exact logical model that corresponds to that commit, reducing “it works on my machine” disputes.

Handling Complex Relationships

  • Composite foreign keys – drag the primary‑key columns from the parent table onto the matching columns in the child table in the same order they appear in the FK definition. If the order differs, the diagram will still show a line but the underlying FK may be mis‑specified; double‑check with SHOW CREATE TABLE child; or SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE.
  • Many‑to‑many junction tables – model them as two separate one‑to‑many links (Parent → Junction ← Child). Some tools automatically collapse the junction into a “many‑to‑many” line; if you need to store attributes on the junction (e.g., EffectiveDate, DiscountPercent), keep the junction as a distinct entity and annotate it.
  • Self‑referencing tables – draw a line from the table back to itself, then label the endpoints with the appropriate role (e.g., “Manager” vs. “Employee”). Most diagram tools let you edit the endpoint labels after the line is placed.

Annotating for Clarity

  • Color‑code by domain – assign a fill color to tables that belong to the same business area (e.g., all scheduling tables in light blue, billing tables in pale green). This visual grouping makes large schemas instantly scannable.
  • Add notes or callouts – most diagram editors support free‑text shapes. Use them to document business rules that aren’t captured by FKs (e.g., “Service may only be active if IsTaxable = 1”).
  • Show indexes and constraints – enable the display of unique keys, check constraints, and triggers. When you later troubleshoot a performance issue, having those objects visible can save a trip back to the SSMS Object Explorer.

Exporting and Sharing

  • Interactive HTML – tools like dbdiagram.io and DataGrip can export an interactive diagram where hovering over a table shows its column list and data types. Embedding this in a Confluence page or internal wiki keeps documentation up‑to‑date with a single click.
  • PDF/PNG for audits – regulators often require a static schema snapshot. Export a high‑resolution PDF, lock the version number in the file name (e.g., ServicesModel_v2024.09.26.pdf), and store it in your compliance repository.
  • Presentation mode – many diagram editors have a “presentation” or “slide” view that lets you step through related tables (e.g., follow a Service from Appointment → Payment → Invoice). Use this during onboarding walkthroughs to avoid overwhelming newcomers with the full graph.

Integrating Diagrams into Development Workflow

  1. Feature branch workflow – when a developer creates a branch to add a new service type, they first update the diagram (add the new table, any FKs, and relevant notes). The diagram change is part of the pull request; reviewers can verify that the model matches the migration scripts.
  2. Schema comparison step – in CI pipelines, run a schema‑compare tool (e.g., Redgate SQL Compare, ApexSQL Diff, or the open‑source sqldiff) between the target database and the model‑generated script. Fail the build if discrepancies are found; this catches diagrams that were forgotten after a hotfix.
  3. Documentation generation – feed the diagram file

… into a documentation generator such as DocFX, Sphinx, or the built‑in documentation feature of DataGrip. That said, by pointing the generator at the exported ERD (often in XML, JSON, or Mermaid syntax), you can automatically produce a living reference that includes table descriptions, column details, and the annotated notes you added earlier. This generated output can be version‑controlled alongside your code, ensuring that every release ships with an up‑to‑date schema overview.

Tip: Keep the diagram file in the same repository folder as your migration scripts (e.g., docs/erd/). Add a small pre‑commit hook that runs the diagram‑to‑doc step and fails if the generated markdown differs from the committed version. This guarantees that documentation drifts are caught early, just like the schema‑compare step in CI That's the whole idea..


Conclusion

Integrating an annotated ERD into your development lifecycle transforms a static picture into a dynamic contract between developers, DBAs, and stakeholders. Which means by coloring domains, labeling self‑references, exposing indexes, and embedding the diagram in interactive HTML or PDF artifacts, you create a single source of truth that is both human‑readable and machine‑processable. Coupling diagram updates with feature branches, schema‑comparison checks, and automated documentation generation ensures that the model stays synchronized with the actual database, reduces onboarding time, and simplifies audit compliance. In short, a well‑maintained ERD is not just a drawing—it is a living specification that drives quality, transparency, and agility across the entire data‑centric workflow.

New Releases

Latest from Us

You Might Like

Good Company for This Post

Thank you for reading about Add The Services Table To The Relationships Window. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home