Watch Create a foreign key in phpmyadmin and relate to primary key in New Channel | Channify

c-owUvlxR65OhbYZDj 3235674 S-JG1z6Bp3U
Views 148,757
Likes 859
Comments 93
Published Feb 2, 2017
Channel Q Visible

Add More Videos To your Channel

Primary keys and foreign keys and how they relate together is the crux of how relational databases work. in this video I add a foreign key to the students table named course_fk. I index field and then through the relation view I relate this field to the primary key field course_id in the courses table. Through the video I highlight how relationships work and how the constraints that are part of relationships in a relational database force the integrity of data by ensuring values in the foreign key must relate to valid IDs in the primary key it is related to.