The Database Changes Necessary to Support Gift Certificates

We needed to make only minor additions to the MyGolfGear database schema to support gift certificates. In fact, we needed to add only a single table. The GiftCertificates table was added to house the needed information. Table 11.1 shows the layout of this table.

Table 11.1. The GiftCertificates Table
Column Name Data Type Size Allow Nulls
GiftCertificateID Int 4 No
Value Money 8 No

This simple table holds only two values for each record. The first value is a unique ID for each gift certificate, and the second value is the amount the gift certificate can be redeemed for. We also store the gift certificate ID in the Basket table so that when an order is being placed, we can see how much ...

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.