The Database Changes to Support Product Reviews

To store and retrieve the data needed for product reviews and ratings, we needed to make additions to the MyGolfGear database. For this reason, we added a new table and modified the stored procedure spGetCompleteCatalog.

We created the ProductReviews table to support the new functionality. This table houses a product ID, user ID, a rating, and comments for each item reviewed. Table 10.1 shows the details of this table.

Table 10.1. The ProductReviews Table
Column Name Data Type Size Allows Nulls
ReviewID uniqueid 16 No
ProductID uniqueid 16 No
UserID int 4 No
Rating int 4 No
Comments varchar 2500 Yes
DateEntered datetime 8 No

We decided that the CatalogDS class was the most appropriate place to house ...

Get Building e-Commerce Sites with the .NET Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.