Ok, I have gone in and recreated this Database on my local machine based upon that chapter. (I just didnt add the constraint on partNo with the RegEx)
Here is the issue I think that you are having: when you are working with a diagram and adding relationships and such, UNTIL you click the Save Icon, none of the relationships that you have setup will actually be applied to the table. (Which I assume you know) But, after clicking save, the Management Studio does not refresh your Object Browser pane. So, after you have created your diagram, click save then go over to yoru Object Browser and right click on your tables folder in the Invoice Database and select refresh. After that, expand the 'Keys' folder for each of the tables and you should see all of the appropriate Primary and Foreign Keys.
In so far as the Composite Key is concerned, I beleive you are correct. He states: "The LineItem is going to start over again with each row" which makes sense since an invoice will have a number of line items, 1, 2, 3 etc. and each invoice will begin back at 1. In this secnario, LineItem and OrderID combine to form the Primary Key. (It would be the only way to get a distinct item from an order)
Lastly, had I designed the table it probably would of had a layout something like this (I name my PK columsn pk in my database designs, just FYI):
OrderDetails
pk int identity auto inc
OrderID int FK_to_Orders
LineItem int
PartNo char(6) FK_to_Products
Qty int
UnitPrice money
As you can see, this table design has 1 primary key and 2 Foreign Keys. LineItem in this table design would be more a descriptor of the Order then anything else and this type of design also eliminates the need for a composite key.
hth.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
Professional IIS 7 and ASP.NET Integrated Programming
Wrox Blox: Introduction to Google Gears
Wrox Blox: Create Amazing Custom User Interfaces with WPF and .NET 3.0
================================================== =========