Learn how the junction table is a useful tool for managing many-to-many relationships in a relational database application.
- [Instructor] In practical terms, it's very common…to have tables with many to many relationships.…For example a single customer may buy many items…and a single item may be purchased by many customers.…This is often implemented with a junction table…and here's a practical example.…We're gonna use the test database for this.…And I'm gonna show you the three tables that we have…in this database, there's a customer table,…there's an item table and there's a sale table.…
And if we take a look at these, you can see their structure.…You'll notice that each of these tables has an id column.…The id column identifies a specific row in each table.…But the sale table, this is the junction table.…You'll notice it has id columns for both customer and item.…So a customer may buy multiple items and an item…may be sold to multiple customers right.…And so for each sale there's an item and…there's a customer and they're identified…by the ids for those respective tables.…
So let's take a look at what a joint query might…look like using all three of these tables.…
- Understanding SQL terminology and syntax
- Creating new tables
- Inserting and updating data
- Writing basic SQL queries
- Sorting and filtering
- Accessing related tables with JOIN
- Working with strings
- Understanding numeric types
- Using aggregate functions and transactions
- Automating data with triggers
- Creating views
- Defining functions in PHP
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times1m 52s
11. Views and Subselects
12. Defined Functions
13. A Simple CRUD Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.