From the course: Microsoft SQL Server 2016: Query Data

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Understanding table relationships

Understanding table relationships - SQL Server Tutorial

From the course: Microsoft SQL Server 2016: Query Data

Start my 1-month free trial

Understanding table relationships

- [Instructor] In this lesson we'll take a look at how different tables in a database can be related, to show a connection between the information that is stored in those tables. Understanding how multiple tables relate to each other is key in understanding how to query the data in those tables, ensuring that the correct results get returned. In a previous lesson on understanding normalization, we discussed why data exists in multiple tables in a relational database. Data split into multiple tables is still related in some way however, and we need a mechanism that creates a link or a relationship between those tables containing that related information. So in other words, relationships are necessary for us to get a complete picture of the data. The mechanism that we use to form these relationships comes in the form of keys. Primary keys are used to indicate uniqueness in a table, so that we don't have duplicate values in a single table. They are the key, if you will, to getting at the…

Contents