Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases

JOINS OR FOREIGN KEY (FK)

Am a bit confuse on which to use, and what really is the difference between this two JOINS AND FOREIGN KEY (FK)

2 Answers

Steven Parker
Steven Parker
231,236 Points

These are usually used together. A foreign key field will typically be matched with the reference field using a JOIN.

The purpose of the foreign key is to require any data entered in the field to have a value that will match one in the other table.

P.S. I used to love that TV show ("Sky King"). It probably helped influence me to become a private pilot.

Yep. I do too, thats how i come by my name. I really appreciate you taking your time to help me out when am stuck. Thanks

Can you drop me your twitter or instagram or fb ***** anyone