Properties

Owner: Production 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB:
Index Size KB: 40 
Rows: 37 
Description: Product subcategories. See ProductCategory table. 

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description
    ProductSubcategoryID  int          Primary key for ProductSubcategory records. 
    ProductCategoryID  int          Product category identification number. Foreign key to ProductCategory.ProductCategoryID. 
    Name  Name  100          Subcategory description. 
    rowguid  uniqueidentifier  16    (newid())      ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 5 column(s)

Identity column

Name Seed Increment Not for replication
  ProductSubcategoryID   

Indexes

Index Primary Unique Description
  PK_ProductSubcategory_ProductSubcategoryID      Primary key (clustered) constraint 
  AK_ProductSubcategory_Name      Unique nonclustered index. 
  AK_ProductSubcategory_rowguid      Unique nonclustered index. Used to support replication samples. 
Total: 3 index(es)

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint
  Production.Product  FK_Product_ProductSubcategory_ProductSubcategoryID  PK_ProductSubcategory_ProductSubcategoryID 
Total: 1 table(s)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  Production.ProductCategory  FK_ProductSubcategory_ProductCategory_ProductCategoryID  PK_ProductCategory_ProductCategoryID 
Total: 1 table(s)

Objects that [Production].[ProductSubcategory] depends on

Object Name Owner Object Type Dep Level
  Name  dbo  User Defined type 
  ProductCategory  Production  Table 
Total: 2 object(s)

Objects that depend on [Production].[ProductSubcategory]

Object Name Owner Object Type Dep Level
  Product  Production  Table 
  vProductAndDescription  Production  View 
  BillOfMaterials  Production  Table 
  ProductCostHistory  Production  Table 
  ProductDocument  Production  Table 
  ProductInventory  Production  Table 
  ProductListPriceHistory  Production  Table 
  ProductProductPhoto  Production  Table 
  ProductReview  Production  Table 
  ProductVendor  Purchasing  Table 
  PurchaseOrderDetail  Purchasing  Table 
  ShoppingCartItem  Sales  Table 
  SpecialOfferProduct  Sales  Table 
  TransactionHistory  Production  Table 
  WorkOrder  Production  Table 
  ufnGetProductDealerPrice  dbo  Function 
  ufnGetProductListPrice  dbo  Function 
  ufnGetProductStandardCost  dbo  Function 
  ufnGetStock  dbo  Function 
  SalesOrderDetail  Sales  Table 
  WorkOrderRouting  Production  Table 
  uspGetBillOfMaterials  dbo  Procedure 
  uspGetWhereUsedProductID  dbo  Procedure 
  iPurchaseOrderDetail  Purchasing  Trigger 
  iWorkOrder  Production  Trigger 
  uPurchaseOrderDetail  Purchasing  Trigger 
  uWorkOrder  Production  Trigger 
  iduSalesOrderDetail  Sales  Trigger 
Total: 28 object(s)

SQL

CREATE TABLE [ProductSubcategory] (
    [ProductSubcategoryID] [int] IDENTITY (1, 1) NOT NULL ,
    [ProductCategoryID] [int] NOT NULL ,
    [Name] [Name] NOT NULL ,
    [rowguid]  uniqueidentifier ROWGUIDCOL  NOT NULL CONSTRAINT [DF_ProductSubcategory_rowguid] DEFAULT (newid()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_ProductSubcategory_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_ProductSubcategory_ProductSubcategoryID] PRIMARY KEY  CLUSTERED
    (
        [ProductSubcategoryID]
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_ProductSubcategory_ProductCategory_ProductCategoryID] FOREIGN KEY
    (
        [ProductCategoryID]
    ) REFERENCES [ProductCategory] (
        [ProductCategoryID]
    )
) ON [PRIMARY]
GO


See Also

List of tables