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.
Second normal form
- Second Normal Form or 2NF might be a relatively easy gate to pass, depending on how you set up your primary keys. If all of your tables use only a single field or column as their primary key then congratulations you've already passed the requirements of 2NF. If you're using a composite primary key though, that's to say a primary key that requires two or more fields than conjunction to uniquely identify a record then we do have a little bit more work to do here. A table is in Second Normal Form if all the fields in the primary key are required to determine the other non-key fields. Here's an example. Here I have a table that is keeping track of the individual LineItems for an invoice. But it has a slightly different configuration than the one that we previously see. Here the Invoice Number and a Product Name are composite keys that link to a specific order that was placed and the specific item that was ordered. The reason the composite key was chosen in this table was so that we're…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.