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 />

Figure 8-29<br />

Click OK for this dialog, and then also click OK to accept the defaults of the Foreign Key Relationship<br />

dialog. As soon as we click OK on the second dialog, we have our first relationship in our new database,<br />

as in Figure 8-30.<br />

Figure 8-30<br />

Now we’ll just do the same thing for our other two relationships. We need to establish a one-to-many<br />

relationship from Orders to OrderDetails (there will be one order header for one or more order details)<br />

based on OrderID. Also, we need a similar relationship going from Products to OrderDetails (there<br />

will be one Products record for many OrderDetails records) based on ProductID as shown in<br />

Figure 8-31.<br />

257

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

Saved successfully!

Ooh no, something went wrong!