Description
Product inventory and manufacturing locations.
Table properties
| name | value |
|---|
| name | [Production].[Location] |
| created | Mar 19 2009 9:08PM |
| modified | Mar 19 2009 9:08PM
|
| ansi nulls | on
|
| quoted identifier | on
|
| row count | 14 |
| Size of data | 8 kb |
| Size of indexes | 24 kb |
| Maximum size of a single row | 219 bytes |
Columns
| column | datatype | length | bytes | default | nulls | PK | FK | UQ | computed | comment |
|---|
| LocationID | smallint identity(1,1) | 5 | 2 | | no
| yes
| |
| no
| Primary key for Location records.
|
| Name | Name | 50 | 200 | | no
|
| |
| no
| Location description.
|
| CostRate | smallmoney | 10 | 4 | ((0.00)) | no
|
| |
| no
| Standard hourly cost of the manufacturing location.
|
| Availability | decimal(8,2) | 8 | 5 | ((0.00)) | no
|
| |
| no
| Work capacity (in hours) of the manufacturing location.
|
| ModifiedDate | datetime | 23 | 8 | (getdate()) | no
|
| |
| no
| Date and time the record was last updated.
|
Indexes
| name | description | column | comment |
|---|
| AK_Location_Name | nonclustered, unique located on PRIMARY | Name | Unique nonclustered index.
|
| PK_Location_LocationID | clustered, unique, primary key located on PRIMARY | LocationID | Clustered index created by a primary key constraint.
|
Referenced by
Foreign key graph
Check constraints
Defaults
Dependency graph
Objects that [Production].[Location] depends on
| name | object type | level |
|---|
| Name | type | 1 |
Sample rows
| LocationID | Name | CostRate | Availability | ModifiedDate |
|---|
| 1
| Tool Crib
| 0.0000
| 0.00
| 6/1/1998 12:00:00 AM
|
| 2
| Sheet Metal Racks
| 0.0000
| 0.00
| 6/1/1998 12:00:00 AM
|
| 3
| Paint Shop
| 0.0000
| 0.00
| 6/1/1998 12:00:00 AM
|
| 4
| Paint Storage
| 0.0000
| 0.00
| 6/1/1998 12:00:00 AM
|
| 5
| Metal Storage
| 0.0000
| 0.00
| 6/1/1998 12:00:00 AM
|
| 6
| Miscellaneous Storage
| 0.0000
| 0.00
| 6/1/1998 12:00:00 AM
|
| 7
| Finished Goods Storage
| 0.0000
| 0.00
| 6/1/1998 12:00:00 AM
|
| 10
| Frame Forming
| 22.5000
| 96.00
| 6/1/1998 12:00:00 AM
|
| 20
| Frame Welding
| 25.0000
| 108.00
| 6/1/1998 12:00:00 AM
|
| 30
| Debur and Polish
| 14.5000
| 120.00
| 6/1/1998 12:00:00 AM
|
Code
CREATE TABLE [Production].[Location](
[LocationID] [smallint] IDENTITY(1,1) NOT NULL,
[Name] [dbo].[Name] NOT NULL,
[LocationID] [smallint] IDENTITY(1,1) NOT NULL,
[CostRate] [smallmoney] NOT NULL,
[Availability] [decimal](8, 2) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Location_LocationID] PRIMARY KEY CLUSTERED
(
[LocationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE [Production].[Location] WITH CHECK ADD CONSTRAINT [CK_Location_Availability] CHECK (([Availability]>=(0.00)))
ALTER TABLE [Production].[Location] CHECK CONSTRAINT [CK_Location_Availability]
ALTER TABLE [Production].[Location] WITH CHECK ADD CONSTRAINT [CK_Location_CostRate] CHECK (([CostRate]>=(0.00)))
ALTER TABLE [Production].[Location] CHECK CONSTRAINT [CK_Location_CostRate]
ALTER TABLE [Production].[Location] ADD CONSTRAINT [DF_Location_CostRate] DEFAULT ((0.00)) FOR [CostRate]
ALTER TABLE [Production].[Location] ADD CONSTRAINT [DF_Location_Availability] DEFAULT ((0.00)) FOR [Availability]
ALTER TABLE [Production].[Location] ADD CONSTRAINT [DF_Location_ModifiedDate] DEFAULT (getdate()) FOR [ModifiedDate]