Properties

Owner: Production 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB:
Index Size KB: 24 
Rows: 14 
Description: Product inventory and manufacturing locations. 

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description
    LocationID  smallint          Primary key for Location records. 
    Name  Name  100          Location description. 
    CostRate  smallmoney    ((0.00))      Standard hourly cost of the manufacturing location. 
    Availability  decimal    ((0.00))      Work capacity (in hours) of the manufacturing location. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 5 column(s)

Identity column

Name Seed Increment Not for replication
  LocationID   

Indexes

Index Primary Unique Description
  PK_Location_LocationID      Primary key (clustered) constraint 
  AK_Location_Name      Unique nonclustered index. 
Total: 2 index(es)

Check Constraints

Name Expression
  CK_Location_Availability  ([Availability]>=(0.00)) 
  CK_Location_CostRate  ([CostRate]>=(0.00)) 
Total: 2 constraint(s)

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint
  Production.ProductInventory  FK_ProductInventory_Location_LocationID  PK_Location_LocationID 
  Production.WorkOrderRouting  FK_WorkOrderRouting_Location_LocationID  PK_Location_LocationID 
Total: 2 table(s)

Objects that [Production].[Location] depends on

Object Name Owner Object Type Dep Level
  Name  dbo  User Defined type 
Total: 1 object(s)

Objects that depend on [Production].[Location]

Object Name Owner Object Type Dep Level
  ProductInventory  Production  Table 
  WorkOrderRouting  Production  Table 
  ufnGetStock  dbo  Function 
Total: 3 object(s)

SQL

CREATE TABLE [Location] (
    [LocationID] [smallint] IDENTITY (1, 1) NOT NULL ,
    [Name] [Name] NOT NULL ,
    [CostRate] [smallmoney] NOT NULL CONSTRAINT [DF_Location_CostRate] DEFAULT ((0.00)),
    [Availability] [decimal](8, 2) NOT NULL CONSTRAINT [DF_Location_Availability] DEFAULT ((0.00)),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_Location_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_Location_LocationID] PRIMARY KEY  CLUSTERED
    (
        [LocationID]
    )  ON [PRIMARY] ,
    CONSTRAINT [CK_Location_Availability] CHECK ([Availability]>=(0.00)),
    CONSTRAINT [CK_Location_CostRate] CHECK ([CostRate]>=(0.00))
) ON [PRIMARY]
GO


See Also

List of tables