From the course: Learning Relational Databases

Unlock the full course today

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

Identify key fields

Identify key fields

From the course: Learning Relational Databases

Start my 1-month free trial

Identify key fields

- [Narrator] One of the most important restrictions that are placed on our data tables is that every row or record must be uniquely identifiable. There has to be one piece of information that you can use to identify exactly one record with absolutely no ambiguity. This particular field is called the table's primary key and it's the value that we use when it comes time to link our related data tables together. Let's suppose that one of our customers has an issue with a product that he ordered. We can go to our orders table and look up the information about that transaction, but how do we find it? The customer first gives us their name, which will show us all of the transactions that they've completed with us, and hopefully that's a bunch. This is good to know and it gets us close, but it doesn't find us a specific transaction. They could tell us the date they placed the order, but again, that would also return all of the other orders placed on the same date, and not identify their own…

Contents