课程: SQL Server Fundamentals: Master Basic Query Techniques
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Surrogate, primary, and foreign keys
课程: SQL Server Fundamentals: Master Basic Query Techniques
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…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。