Understanding Table Relationships

Table relationships are the foundation of a well-designed database, allowing you to create meaningful connections between different types of information.

What You'll Learn

This guide will help you understand how tables relate to each other in your Knack application. You'll learn about parent and child tables, discover how to create multi-level relationships, and understand how to use display fields effectively.

Understanding Table Relationships

Relationships created through Connection Fields allow you to tie your records together in meaningful ways. These connections enable powerful features such as viewing related data across tables, implementing user-specific data access controls, and creating dynamic calculations and summaries.

Note: Before creating connections, it's essential to understand the fundamental relationship types and their implications for your data structure.

In Knack, we use connections to map real-world relationships. They're the bridges that link different types of data together, unlocking powerful features that let you:

  • View related data: See the complete picture - like viewing all contacts associated with a company in one table
  • Control user access: Ensure Live App users see only what's relevant to them - for example, customers viewing just their own orders after logging in
  • Create powerful insights: Generate reports that tell the full story, like monthly sales totals broken down by salesperson

How do connections work in Knack?

We make connections simple by using a special type of field - a Connection field. If you're familiar with databases, think of these like the links or joins you've used before, but more intuitive.

Here are examples of what you might connect:

  • Employees with their Companies
  • Managers with their Locations
  • Orders with their Customers
  • Students with their Classes

Each connection helps tell a more complete story about your data.

Tip: You need at least two tables to create connections. See our Tables documentation for more information about creating and managing tables.