From the course: Relational Databases Essential Training

Unlock the full course today

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

Diagram a relationship

Diagram a relationship

From the course: Relational Databases Essential Training

Start my 1-month free trial

Diagram a relationship

- [Instructor] Let's go back to our database diagram and hook these to tables together with a formal relationship. I'm continuing on from the last chapter, but if you need the text that I have on the left side of my screen that builds the Products and Suppliers table, then you can find that text in the exercise files for this course. To create a relationship between the Products table and Suppliers table, we first need to identify what columns we'll join together. First, let's think about the direction of the relationship. Does it make more sense that each, individual product has multiple suppliers? Or that each, individual supplier sends us multiple products? I think the latter makes sense in a typical business, so I'm going to join the primary key from the Suppliers table to the Products table. But what field should it connect to over here? We currently have a supplier field that's storing a "varchar100" data…

Contents