How is a Primary Key Different from a Foreign Key?
While a primary key uniquely identifies a record within its own table, a foreign key is a field (or a collection of fields) in one table that uniquely identifies a row of another table. The foreign key establishes a link between the data in the two tables, allowing for relational database structures. This is particularly useful in business for creating complex queries that combine data from multiple tables, such as sales records linked to customer data.