---
title: "Using Virtual Foreign Keys Across SQL and NoSQL | DreamFactory"
description: "Virtual foreign keys let you declare a relationship between tables that have none — including across a SQL and a NoSQL database — and then fetch the related…"
url: "https://www.dreamfactory.com/videos/virtual-foreign-keys-sql-nosql"
---

[Home](https://www.dreamfactory.com/) › [Videos](https://www.dreamfactory.com/videos) › Using Virtual Foreign Keys Across SQL and NoSQL

# Using Virtual Foreign Keys Across SQL and NoSQL

Tutorial·20 May 2016·5 min 11 sec

Virtual foreign keys let you declare a relationship between tables that have none — including across a SQL and a NoSQL database — and then fetch the related data in a single API call, with no code written.

**Recorded in 2016.** The concepts still apply, but the interface shown predates the current DreamFactory release. Some steps may differ in the current release.

## What you’ll learn

* Declaring a relationship where no real foreign key exists
* Linking a SQL table to a NoSQL collection
* Fetching related records in one API call

[Book a Demo](https://www.dreamfactory.com/demo)[More on our YouTube channel](https://www.youtube.com/@DreamfactoryAPI)

## More videos

* [Admin Console: the Packages Tab](https://www.dreamfactory.com/videos/admin-console-packages-tab)
* [Writing Node.js Scripts in DreamFactory](https://www.dreamfactory.com/videos/nodejs-scripts)
* [Turning a SOAP Web Service into a REST API](https://www.dreamfactory.com/videos/soap-to-rest-api)
* [Using Server-Side Scripts on API Endpoints](https://www.dreamfactory.com/videos/server-side-scripts)

[Browse all videos ›](https://www.dreamfactory.com/videos)

Video: https://www.youtube.com/watch?v=GtO6fW8qXK0
