17.06.2013 Views

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 8: Being Normal: Normalization and Other Basic Design Issues<br />

246<br />

Figure 8-19<br />

If you did your drag and drop right, the names of the columns on both sides of the relationship should<br />

come up right to start with, but if they came up with something other than you expected, don’t worry<br />

too much about — just click the combo box for the table you want to change columns for and select the<br />

new column, changing the name of the relationship from the default of FK_CustomerNotes_Customers<br />

to FKCustomerHasNotes. As soon as you click OK, you will be taken to the more standard relationship<br />

dialog so you can set any other settings you may want to adjust before you save the new relationship to<br />

the table. Go ahead and change the DELETE and UPDATE CASCADE actions to CASCADE — ensuring that<br />

if the related customer record ever gets updated or deleted, the notes for that customer will also get<br />

updated or deleted as necessary. You can see what this looks like in Figure 8-20.<br />

Figure 8-20<br />

With this done, you can click OK and see the new relationship line in your diagram.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!