---
title: Virtual Relationships Between Database Tables
description: We use the schema information stored in the database to learn about the various relationships between the tables to bring you DataMesh.
image: https://blog.dreamfactory.com/hubfs/Imported_Blog_Media/datamesh.png
---

[![DreamFactory logo](https://cdn.prod.website-files.com/64ed8da8a866be7a702fbae0/68d51994d3678214b54acb60_dreamfactory-navbar-logo.svg)](https://www.dreamfactory.com/)

 Products & Services

[AI Data Gateway](https://www.dreamfactory.com/ai-data-gateway/overview)

[Overview Why DreamFactory exists](https://www.dreamfactory.com/ai-data-gateway/overview) [Data Gov, Comp, Security Policy enforcement at the API layer](https://www.dreamfactory.com/ai-data-gateway/ai-data-governance) [Standard API Layer One contract for every backend](https://www.dreamfactory.com/ai-data-gateway/standard-api-layer) [API Gateway Functionality Routing, auth, rate limits, observability](https://www.dreamfactory.com/ai-data-gateway/api-gateway-functionality) [Deployment & Integration Self-hosted, cloud, hybrid](https://www.dreamfactory.com/ai-data-gateway/on-premise-deployment-and-integration) [Developer Productivity Auto-generated, never hand-coded](https://www.dreamfactory.com/ai-data-gateway/ai-development-accelerated) [AI App Architectures Patterns for RAG, agents, MCP](https://www.dreamfactory.com/ai-data-gateway/enterprise-ai-architectures)

AI Data Models

[AIOpenAI](https://www.dreamfactory.com/use-cases/openai) [GGoogle Gemini](https://www.dreamfactory.com/use-cases/google-gemini) [CAnthropic Claude](https://www.dreamfactory.com/use-cases/anthropic-claude-landing) [LMeta Llama](https://www.dreamfactory.com/use-cases/meta-llama) [MMistral AI](https://www.dreamfactory.com/use-cases/mistral) [CoCohere](https://www.dreamfactory.com/use-cases/cohere)

Services and support

[Quickstart Service Packages Expert-led Quickstarts to production](https://www.dreamfactory.com/services-and-support/quickstart-services-packages)

API Management

[Generate & Manage REST APIs From any database, in seconds](https://www.dreamfactory.com/api-management/generate-rest-apis) [Features Security, scripting, self-hosted & more](https://www.dreamfactory.com/api-management/features) [API Generation The complete guide to auto-generated APIs](https://blog.dreamfactory.com/a-complete-guide-to-api-generation) [API Management Concepts, tools, and best practises](https://blog.dreamfactory.com/what-is-api-management-a-brief-overview-of-api-management-concepts-and-tools?_gl=1*jl0njh*_gcl_au*MjQzMjgwMTc3LjE3ODIzMjI3MzY)

 Use Cases

AI Use Cases

[AI Data Access Secure, governed reads for your LLMs](https://www.dreamfactory.com/use-cases/ai-data-access) [MCP Server Drop-in Model Context Protocol](https://www.dreamfactory.com/use-cases/mcp-server) [Legacy Modernization Wrap mainframes with REST](https://www.dreamfactory.com/use-cases/legacy-modernization) [Data Governance Audit every call, enforce every policy](https://www.dreamfactory.com/use-cases/data-governance)

[Customer Case Studies](https://www.dreamfactory.com/case-studies)

[Energy Modernization](https://www.dreamfactory.com/case-studies/energy-snowflake-modernization) [Government Modernization](https://www.dreamfactory.com/case-studies/government-mainframe-oracle-modernization) [Government Business Intelligence](https://www.dreamfactory.com/case-studies/government-sql-server-bi-analyst-queries) [Manufacturing Modernization](https://www.dreamfactory.com/case-studies/steel-manufacturing-sap-erp-modernization) [Financial Services Investor Portal](https://www.dreamfactory.com/case-studies/financial-services-sql-server-investor-portal) [Non-Profit Partner Data Sharing](https://www.dreamfactory.com/case-studies/non-profit-sql-server-partner-data-sharing) [Professional Services Exec Dashboards](https://www.dreamfactory.com/case-studies/professional-services-erp-dashboards) [Education HR and External Data Sharing](https://www.dreamfactory.com/case-studies/education-student-hr-sql-server-mysql-external-data-sharing)

 Industries

Industries

#### [Healthcare HIPAA-grade APIs across EHR, claims, and labs.](https://www.dreamfactory.com/use-cases/healthcare)

#### [Financial Services Portfolios, partners, and portals on one layer.](https://www.dreamfactory.com/use-cases/financial-services)

#### [Government Modernize mainframes without re-platforming.](https://www.dreamfactory.com/use-cases/government)

#### [Manufacturing SAP, MES, and shop-floor data, governed.](https://www.dreamfactory.com/use-cases/manufacturing)

#### [Spotlight How enterprises run on DreamFactory From healthcare to energy to finance — governance baked into every endpoint. Browse case studies →](https://www.dreamfactory.com/case-studies)

 Connectors

SQL Database

[SQL SQL Server](https://www.dreamfactory.com/connectors/sql-server) [OR Oracle](https://www.dreamfactory.com/connectors/oracle) [PG PostgreSQL](https://www.dreamfactory.com/connectors/postgresql) [My MySQL](https://www.dreamfactory.com/connectors/mysql)

NoSQL & Docs

[Dy DynamoDB](https://www.dreamfactory.com/connectors/dynamodb) [Do DocumentDB](https://www.dreamfactory.com/connectors/azure-documentdb) [Mo MongoDB](https://www.dreamfactory.com/connectors/mongodb) [Cb CouchDB](https://www.dreamfactory.com/connectors/couch-db)

Cloud Warehouses

[S3 S3](https://www.dreamfactory.com/connectors/amazon-s3) [Ab Azureblob](https://www.dreamfactory.com/connectors/azure-blob) [FS FTP/SFTP](https://www.dreamfactory.com/connectors/ftp-sftp) [LS Local Storage](https://www.dreamfactory.com/connectors/local-storage)

C & SaaS

[Sf Salesforce](https://www.dreamfactory.com/connectors/salesforce) [API REST / SOAP](https://www.dreamfactory.com/connectors/soap-to-rest)

[See all 30+ connectors](https://www.dreamfactory.com/connectors)

[Blog](https://blog.dreamfactory.com/)

[FREE 30 Minute Demo](https://www.dreamfactory.com/demo)

[![DreamFactory logo](https://cdn.prod.website-files.com/64ed8da8a866be7a702fbae0/68d51994d3678214b54acb60_dreamfactory-navbar-logo.svg)](https://www.dreamfactory.com/)

![hamburger](https://blog.dreamfactory.com/hubfs/raw_assets/public/dreamfactory/images/megamenu/menu-hamburger.svg) ![close](https://blog.dreamfactory.com/hubfs/raw_assets/public/dreamfactory/images/megamenu/close-menu.svg)

 Back to main menu

 Products & Services

 Use Cases

 Industries

 Connectors

[Blog](https://blog.dreamfactory.com/)

[FREE 30 Minute Demo](https://www.dreamfactory.com/demo)

[AI Data Gateway](https://www.dreamfactory.com/ai-data-gateway/overview)

[Overview Why DreamFactory exists](https://www.dreamfactory.com/ai-data-gateway/overview) [Data Gov, Comp, Security Policy enforcement at the API layer](https://www.dreamfactory.com/ai-data-gateway/ai-data-governance) [Standard API Layer One contract for every backend](https://www.dreamfactory.com/ai-data-gateway/standard-api-layer) [API Gateway Functionality Routing, auth, rate limits, observability](https://www.dreamfactory.com/ai-data-gateway/api-gateway-functionality) [Deployment & Integration Self-hosted, cloud, hybrid](https://www.dreamfactory.com/ai-data-gateway/on-premise-deployment-and-integration) [Developer Productivity Auto-generated, never hand-coded](https://www.dreamfactory.com/ai-data-gateway/ai-development-accelerated) [AI App Architectures Patterns for RAG, agents, MCP](https://www.dreamfactory.com/ai-data-gateway/enterprise-ai-architectures)

AI Data Models

[AIOpenAI](https://www.dreamfactory.com/use-cases/openai) [GGoogle Gemini](https://www.dreamfactory.com/use-cases/google-gemini) [CAnthropic Claude](https://www.dreamfactory.com/use-cases/anthropic-claude-landing) [LMeta Llama](https://www.dreamfactory.com/use-cases/meta-llama) [MMistral AI](https://www.dreamfactory.com/use-cases/mistral) [CoCohere](https://www.dreamfactory.com/use-cases/cohere)

Services and support

[Quickstart Service Packages Expert-led Quickstarts to production](https://www.dreamfactory.com/services-and-support/quickstart-services-packages)

AI Data Models

[Generate & Manage REST APIs From any database, in seconds](https://www.dreamfactory.com/api-management/generate-rest-apis) [Features Security, scripting, self-hosted & more](https://www.dreamfactory.com/api-management/features) [API Generation The complete guide to auto-generated APIs](https://blog.dreamfactory.com/a-complete-guide-to-api-generation) [API Management Concepts, tools, and best practises](https://blog.dreamfactory.com/what-is-api-management-a-brief-overview-of-api-management-concepts-and-tools?_gl=1*jl0njh*_gcl_au*MjQzMjgwMTc3LjE3ODIzMjI3MzY)

AI Use Cases

[AI Data Access Secure, governed reads for your LLMs](https://www.dreamfactory.com/use-cases/ai-data-access) [MCP Server Drop-in Model Context Protocol](https://www.dreamfactory.com/use-cases/mcp-server) [Legacy Modernization Wrap mainframes with REST](https://www.dreamfactory.com/use-cases/legacy-modernization) [Data Governance Audit every call, enforce every policy](https://www.dreamfactory.com/use-cases/data-governance)

[Customer Case Studies](https://www.dreamfactory.com/case-studies)

[Energy Modernization](https://www.dreamfactory.com/case-studies/energy-snowflake-modernization) [Government Modernization](https://www.dreamfactory.com/case-studies/government-mainframe-oracle-modernization) [Government Business Intelligence](https://www.dreamfactory.com/case-studies/government-sql-server-bi-analyst-queries) [Manufacturing Modernization](https://www.dreamfactory.com/case-studies/steel-manufacturing-sap-erp-modernization) [Financial Services Investor Portal](https://www.dreamfactory.com/case-studies/financial-services-sql-server-investor-portal) [Non-Profit Partner Data Sharing](https://www.dreamfactory.com/case-studies/non-profit-sql-server-partner-data-sharing) [Professional Services Exec Dashboards](https://www.dreamfactory.com/case-studies/professional-services-erp-dashboards) [Education HR and External Data Sharing](https://www.dreamfactory.com/case-studies/education-student-hr-sql-server-mysql-external-data-sharing)

Industries

#### [Healthcare HIPAA-grade APIs across EHR, claims, and labs.](https://www.dreamfactory.com/use-cases/healthcare)

#### [Financial Services Portfolios, partners, and portals on one layer.](https://www.dreamfactory.com/use-cases/financial-services)

#### [Government Modernize mainframes without re-platforming.](https://www.dreamfactory.com/use-cases/government)

#### [Manufacturing SAP, MES, and shop-floor data, governed.](https://www.dreamfactory.com/use-cases/manufacturing)

SQL Database

[SQL SQL Server](https://www.dreamfactory.com/connectors/sql-server) [OR Oracle](https://www.dreamfactory.com/connectors/oracle) [PG PostgreSQL](https://www.dreamfactory.com/connectors/postgresql) [My MySQL](https://www.dreamfactory.com/connectors/mysql)

NoSQL & Docs

[Dy DynamoDB](https://www.dreamfactory.com/connectors/dynamodb) [Do DocumentDB](https://www.dreamfactory.com/connectors/azure-documentdb) [Mo MongoDB](https://www.dreamfactory.com/connectors/mongodb) [Cb CouchDB](https://www.dreamfactory.com/connectors/couch-db)

Cloud Warehouses

[S3 S3](https://www.dreamfactory.com/connectors/amazon-s3) [Ab Azureblob](https://www.dreamfactory.com/connectors/azure-blob) [FS FTP/SFTP](https://www.dreamfactory.com/connectors/ftp-sftp) [LS Local Storage](https://www.dreamfactory.com/connectors/local-storage)

C & SaaS

[Sf Salesforce](https://www.dreamfactory.com/connectors/salesforce) [API REST / SOAP](https://www.dreamfactory.com/connectors/soap-to-rest)

[See all 30+ connectors](https://www.dreamfactory.com/connectors)

[![back arrow](https://blog.dreamfactory.com/hubfs/raw_assets/public/dreamfactory/images/orange-arrow.svg) Blog](https://blog.dreamfactory.com/)

# Virtual Relationships Between Database Tables

 by Terence Bennett

![calendar icon](https://blog.dreamfactory.com/hubfs/raw_assets/public/dreamfactory/images/calendar-icon.svg) January 12, 2026

Table of contents

RECOMMENDED ARTICLES

- [A Complete Guide to API Generation](https://blog.dreamfactory.com/a-complete-guide-to-api-generation)
- [10 Best API Management Tools](https://blog.dreamfactory.com/what-is-api-management-a-brief-overview-of-api-management-concepts-and-tools)
- [Creating a Microsoft SQL Server API in Less Than 5 minutes with DreamFactory](https://blog.dreamfactory.com/creating-a-microsoft-sql-server-api-in-less-than-5-minutes-with-dreamfactory)
- [Hasura vs. DreamFactory: A Comprehensive Comparison](https://blog.dreamfactory.com/hasura-vs-dreamfactory)
- [Build A Snowflake REST API in Less Than 5 Minutes](https://blog.dreamfactory.com/generate-a-snowflake-rest-api-in-less-than-5-minutes)

![datamesh.png](https://blog.dreamfactory.com/hs-fs/hubfs/Imported_Blog_Media/datamesh.png?width=745&height=372&name=datamesh.png "datamesh.png")

A few years ago, we wrote a blog post about [working with related data](https://blog.dreamfactory.com/sql-and-rest-working-with-related-data/) using the DreamFactory REST API platform. The SQL DB service can return a table along with any number of related tables in a single API call. You can POST the JSON document back to the API in order to create, update, or delete the related data. DreamFactory automatically maintains all of the links and junction objects for you. This is possible because we use the schema information stored in the database to learn about the [various relationships between the tables](https://blog.dreamfactory.com/synchronizing-database-data-using-an-api/).

But what if you have tables that are related in some way, and those relationships are not detailed in the schema? What if the related tables exist on different databases, or even on different servers? Previously, the only solution was to make multiple calls from the client-side and assemble the information as needed. Or you could create a custom service or write a server-side script to combine unrelated tables of data. Here is a [recent blog post](https://blog.dreamfactory.com/combining-multiple-data-sources-in-a-single-restapi-call-with-dreamfactory-2.0) about how to do this.

But now, with the introduction of DreamFactory 2.0, developers can specify virtual relationships between any two tables. The tables can be located on different databases, and the databases can be located on different servers. This is a game changing capability because now a developer can create, read, update, and delete related data across multiple servers with a single REST API call!

These virtual relationships are imposed from outside by the DreamFactory platform. There is no need to change the actual configuration of your database. What's more, once DreamFactory knows about the virtual relationships, you can work with related data of any kind without the need for server-side scripting. This feature packs even more capability into the request URL string itself, further reducing the need to build custom REST APIs.

### The Magic of DataMesh

We call this revolutionary new feature DataMesh. The SQL DB service now combines the existing relationships found in the schema with any number of virtual relationships specified by the developer. These virtual foreign keys are stored locally as part of the system information maintained by the DreamFactory platform. So now, developers can provision virtual relationships between any of the database services found on the platform. The REST API normalizes database access, so for example, you could combine information from SQL Server, Oracle, and MySQL seamlessly. These new virtual relationships are then exposed in the table records API and invoked with a simple URL parameter just like the other existing relationships.

![Slide1-2.jpg](https://blog.dreamfactory.com/hs-fs/hubfs/Imported_Blog_Media/Slide1-2.jpg?width=720&height=540&name=Slide1-2.jpg "Slide1-2.jpg")

### An Inter-Service Example

Say for example that you have a legacy SQL database that contains a **contact** table with fields like **email**, **name**, **phone**, etc. Over the years a **customer** table was also created to store purchase information, and these records include a **username** field which is in the form of an email address. The schema for this database doesn't reflect any relationships between these tables. This might be for historical reasons, or perhaps the developer does not have permission to modify the schema. At any rate, now you need to create an application which displays information from the **contact** table along with the related purchase history from the **customer** table.

Related reading: [SQL and REST working with related data](https://blog.dreamfactory.com/sql-and-rest-working-with-related-data/)

Using DataMesh, you could create a virtual relationship between the **contact** table and the **customer** table by taking the following steps:

- In the Admin Console you need to provision a service for the legacy database, for this example let's use the name **mysql**
- Choose your primary table to access the data, in this case the **contact** table
- Select the **customer** table via the Schema Tab in the Admin Console

![schema_table_copy.png](https://blog.dreamfactory.com/hs-fs/hubfs/Imported_Blog_Media/schema_table_copy.png?width=640&name=schema_table_copy.png "schema_table_copy.png")

- Select the **username** field, and open for edit
- Click the Foreign Key and Virtual Foreign Key checkboxes, this will enable the Reference Table and Field selection menus below
- Select **contact** for the table and **email** for the field
- Then click the Update button to save the configuration

![schema_field_copy.png](https://blog.dreamfactory.com/hs-fs/hubfs/Imported_Blog_Media/schema_field_copy-1.png?width=665&name=schema_field_copy-1.png "schema_field_copy.png")

This will automatically create a *belongs\_to* relationship from the **customer** to the **contact**, as well as a *has\_many* relationship in the opposite direction. That's it! You have created a virtual relationship.

![schema_relationship_copy.png](https://blog.dreamfactory.com/hs-fs/hubfs/Imported_Blog_Media/schema_relationship_copy-1.png?width=745&height=113&name=schema_relationship_copy-1.png "schema_relationship_copy.png")

To see how these different relationships are represented or provisioned via the API, take a look at the following JSON snippets...

As a baseline, here is a field with a foreign key that is part of the existing database schema. In this case our **contact** table points to a business **account** table:

```
    {
        "name": "account_id",
        "type": "reference",
        "is_virtual_foreign_key": false,
        "is_foreign_service": false,
        "ref_service": null,
        "ref_table": "account",
        "ref_fields": "id"
    }
```

Here is the **customer** field **username** with a virtual foreign key pointing to the **contact** table on the same database:

```
    {
        "name": "username",
        "type": "string",
        "is_virtual_foreign_key": true,
        "is_foreign_service": false,
        "ref_service": null,
        "ref_table": "contact",
        "ref_fields": "email"
    }
```

The relationship from the perspective of the **contact** table:

```
    {
        "name": "customer_by_username",
        "type": "has_many",
        "field": "email",
        "is_virtual": true,
        "is_foreign_service": false,
        "ref_service": null,
        "ref_table": "customer",
        "ref_fields": "username"
    }
```

The relationship from the perspective of the **customer** table:

```
    {
        "name": "contact_by_username",
        "type": "belongs_to",
        "field": "username",
        "is_virtual": true,
        "is_foreign_service": false,
        "ref_service": null,
        "ref_table": "contact",
        "ref_fields": "email"
    }
```

### A Service-to-Service Example

Let's work with the above example again, except this time assume that the **customer** table exists on a separate database. The only real differences in provisioning are as follows:

- In the Admin Console you need to provision an additional service for the separate database that contains the **customer** table, for this example let's use the name **ecommerce**
- After clicking the Foreign Key and Virtual Foreign Key checkboxes, you also need to click the Foreign Reference Service checkbox which allows you to select the additional database

![schema_field2_copy.png](https://blog.dreamfactory.com/hs-fs/hubfs/Imported_Blog_Media/schema_field2_copy-1.png?width=1024&name=schema_field2_copy-1.png "schema_field2_copy.png")

Take note of the "dot" notation in the relationship name. This indicates that the relationship is pointing to a different service.

![schema_relationship2_copy.png](https://blog.dreamfactory.com/hs-fs/hubfs/Imported_Blog_Media/schema_relationship2_copy-1.png?width=745&height=113&name=schema_relationship2_copy-1.png "schema_relationship2_copy.png")

And here are the JSON snippets for this scenario...

Here is the **customer** field **username** with a virtual foreign key pointing to the **contact** table on the legacy database we named **mysql**:

```
    {
        "name": "username",
        "type": "string",
        "is_foreign_key": true,
        "is_virtual_foreign_key": true,
        "is_foreign_service": true,
        "ref_service": "legacy",
        "ref_table": "contact",
        "ref_fields": "email"
    }
```

The relationship from the perspective of the **contact** table:

```
    {
        "name": "ecommerce.customer_by_username",
        "type": "has_many",
        "field": "email",
        "is_virtual": true,
        "is_foreign_service": true,
        "ref_service": "ecommerce",
        "ref_table": "customer",
        "ref_fields": "username"
    }
```

The relationship from the perspective of the **customer** table:

```
    {
        "name": "mysql.contact_by_username",
        "type": "belongs_to",
        "field": "username",
        "is_virtual": true,
        "is_foreign_service": true,
        "ref_service": "mysql",
        "ref_table": "contact",
        "ref_fields": "email"
    }
```

Note that the names of the relationships are auto-generated, but can be aliased to something more desirable for use in the API if needed.

### Using the Virtual Relationships

Any of the created relationships can be used in the "related" URL query parameter, just like existing relationships defined by the schema. The beauty of this is that an administrator can provision the databases and create the virtual relationships and then a client developer can simply use the related data given their role based access settings. No custom services needed. In our demo data, the contact "Jane Smith" was found in the customer table with the same email.

```
https://demo/api/v2/mysql/_table/contact?related=customer_by_username
```

```
{
    "resource": [
        {
            "id": 1,
            "first_name": "John",
            "last_name": "Smith",
            "display_name": "John Smith",
            "email": "johnsmith@demo.com",
            "customer_by_username": []
        },
        {
            "id": 2,
            "first_name": "Jane",
            "last_name": "Smith",
            "display_name": "Jane Smith",
            "email": "janesmith@demo.com",
            "customer_by_username": [
                {
                    "id": 2,
                    "display_name": "Jane Elise Smith",
                    "username": "janesmith@demo.com"
                }
            ]
        }
    ]
}
```

### Video

Also check out this short video demo of the material covered in this blog.

### In Conclusion

There are some very powerful capabilities in DreamFactory 2.0 for combining multiple data sources. The new DataMesh feature takes our product one step further in getting all the data your application needs in a easy, clean, and succinct manner. That plus all of the other great features of DreamFactory should get you well on your way to happy app development!

TAGS: [Social Links Menu](https://blog.dreamfactory.com/tag/social-links-menu)

![Terence Bennett](https://blog.dreamfactory.com/hs-fs/hubfs/1624046620145.jpg?width=100&height=100&name=1624046620145.jpg)

Terence Bennett

Terence Bennett, CEO of DreamFactory, has a wealth of experience in government IT systems and Google Cloud. His impressive background includes being a former U.S. Navy Intelligence Officer and a former member of Google's Red Team. Prior to becoming CEO, he served as COO at DreamFactory Software.

 Stay Connected with   
 The Connector Newsletter!

 Subscribe to stay up-to-date with DreamFactory's latest product updates, API best practices, and tech humor in your inbox.

[![Dreamfactory Logo](https://blog.dreamfactory.com/hubfs/raw_assets/public/dreamfactory/images/megamenu/Megamenu-logo.svg)](https://www.dreamfactory.com/)

[Call Sales +1 (415) 993-5877](tel:+14159935877)

Open – Mon–Fri 9–5 PT

[FREE 30 Minute Demo](https://www.dreamfactory.com/demo)

#### Follow us

- [GitHub](https://github.com/dreamfactorysoftware/dreamfactory)
- [Facebook](https://www.facebook.com/dfsoftwareinc/)
- [X (Twitter)](https://twitter.com/dfsoftwareinc)
- [LinkedIn](https://www.linkedin.com/company/dreamfactory-software)
- [YouTube](https://www.youtube.com/c/dreamfactorysoftware)

### Features

[Features](https://www.dreamfactory.com/features) [Self hosted](https://www.dreamfactory.com/features#self) [API Generation](https://www.dreamfactory.com/features#api) [Security](https://www.dreamfactory.com/features#secure) [Customization](https://www.dreamfactory.com/features#custom) [Pricing](https://www.dreamfactory.com/pricing)

### Installers

[Linux](https://www.dreamfactory.com/features#installer) [Docker](https://www.dreamfactory.com/features#installer) [Kubernetes](https://www.dreamfactory.com/features#installer)

### API Resources

[Documentation](https://docs.dreamfactory.com/) [Case Studies](https://www.dreamfactory.com/stories) [White Papers](https://www.dreamfactory.com/resources/whitepapers) [Academy](https://www.dreamfactory.com/academy) [API Calculator](https://calculator.dreamfactory.com) [Open Source](https://github.com/dreamfactorysoftware)

### Company

[Blog](https://blog.dreamfactory.com/) [Hub](https://www.dreamfactory.com/hub) [About us](https://www.dreamfactory.com/about) [Partners](https://www.dreamfactory.com/partners) [Support](https://www.dreamfactory.com/support) [Connectors](https://www.dreamfactory.com/connectors) [Contact Us](https://www.dreamfactory.com/demo)

 © 2025 DreamFactory. All rights reserved.

[Terms of Use](https://www.dreamfactory.com/terms-of-use) [Privacy Policy](https://www.dreamfactory.com/privacy-policy) [LLMs](https://www.dreamfactory.com/llms.txt)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Terence Bennett",
    "url" : "https://blog.dreamfactory.com/author/terencebennett"
  },
  "dateModified" : "2024-05-07T08:22:45.427Z",
  "datePublished" : "2026-01-13T00:00:00.000Z",
  "headline" : "Virtual Relationships Between Database Tables",
  "image" : [ "https://blog.dreamfactory.com/hubfs/Imported_Blog_Media/datamesh.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://blog.dreamfactory.com/working-with-virtually-related-data-0",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blog.dreamfactory.com/hubfs/DreamFactory%20-%20Orange%20-%20Transparent-1.png"
    }
  }
}
```