From the course: SQL Server Fundamentals: Master Basic Query Techniques

Unlock the full course today

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

Surrogate, primary, and foreign keys

Surrogate, primary, and foreign keys - SQL Tutorial

From the course: SQL Server Fundamentals: Master Basic Query Techniques

Start my 1-month free trial

Surrogate, primary, and foreign keys

- [Instructor] Time to delve a little deeper into some of the terminology used when discussing the types of relationships among the tables in a relational database. As I said, all of their relationships are managed through keys that can be used as a stand in when they are referenced in another table. These keys are called surrogate keys. These values don't have any meaning on their own and are most often generated by SQL Server, as with an Identity, Sequence or NewID order GUID, short for global unique identifier. If I called someone at Two Trees Olive Oil and asked, do you remember the order total for order number 180? They would have no idea what I was talking about. 180 is just a surrogate key that represents all of the data associated with that order. If instead, I asked, do you remember the order total for Merrill Freeman's order on May 2nd, 2018? They might have some chance of at least understanding what I'm asking about. Providing the customer's name and the order date in this…

Contents