From the course: Relational Databases Essential Training
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
Create a unique constraint
From the course: Relational Databases Essential Training
Create a unique constraint
- [Instructor] In our database diagram that we started in the previous chapter, we've already identified the primary keys for each of these tables: the Part Number field in the Products table and the Supplier ID field in the Suppliers table. Now, I've saved this text that makes up these tables into the exercise files for the course for your reference. Now let's suppose we also need to ensure that the Product Name in the Products table also has a unique constraint applied to it. You can make a note of that requirement in this diagramming application by simply placing the word "unique" after the data type. That'll update the diagram on the right and it displays this little key icon here on this particular column. These icons are specific to this diagramming tool, so you're not going to see them in your RDBMS when you're actually creating the database that you're designing here. But it's just this app's way of noting the…
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.