Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Product Table

This table holds all the products on display in the site. Each product is tied to a category, has a price, and also has its stock maintained. Whenever the product has reached its reorder level, an alert is raised to the Manager and Administrator of the site to procure it. The Product table structure is shown in Table 21.5.

Table 21.5. Product
Column NameDatatypeKeyDescription
ProductIdIntPrimary KeyIdentity field (auto-generated number to identify the uniqueness of the record).
ProductNameVarchar(50)Not NullThe name of the product.
DescriptionVarchar(250)Not NullThe description of the product.
CategoryIdIntForeign KeyThe product associated with a category.
QuantityInStockIntNot NullThe current quantity of products.
ReorderLevelIntNot NullThe minimum quantity of a product before it has to be procured.
CostPricemoneyNot NullThe purchase price from the supplier.
SellingPricemoneyNot NullThe sale price to the customer.
ImageId tableIntForeign KeyFetched from the images.
NotesVarchar(250)Allow NullAny notes/remarks on the product.
CreatedDateDatetimeNot Null [Default—Getdate()]The date of creation of the product in the system.
CreatedByIntNot Null [Logged-in user. Either the Manager’s UserId or the Administrator’s UserId.]The UserId of the user who created this record.



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint