Tables [dbo].[MaterialItemCodeMap]
Properties
PropertyValue
Row Count (~)54
Created5:32:31 PM Wednesday, January 2, 2008
Last Modified8:30:58 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_MaterialItemCodeMap: MaterialItemCodeMapIDMaterialItemCodeMapIDint4
No
1 - 1
Foreign Keys FK_MaterialItemCodeMap_MaterialType: [dbo].[MaterialType].MaterialTypeFIDIndexes IX_MaterialItemCodeMap_MaterialCPUType: MaterialCPUTypeFID\MaterialTypeFIDIndexes IX_MaterialItemCodeMap_MaterialType: MaterialTypeFID\MaterialCPUTypeFIDIndexes IX_MaterialItemCodeMap_Type_CPUType: MaterialTypeFID\MaterialCPUTypeFIDMaterialTypeFIDint4
No
Foreign Keys FK_MaterialItemCodeMap_MaterialCPUType: [dbo].[MaterialCPUType].MaterialCPUTypeFIDIndexes IX_MaterialItemCodeMap_MaterialCPUType: MaterialCPUTypeFID\MaterialTypeFIDIndexes IX_MaterialItemCodeMap_MaterialType: MaterialTypeFID\MaterialCPUTypeFIDIndexes IX_MaterialItemCodeMap_Type_CPUType: MaterialTypeFID\MaterialCPUTypeFIDMaterialCPUTypeFIDint4
No
Foreign Keys FK_MaterialItemCodeMap_ItemCode: [dbo].[ItemCode].ItemCodeFIDIndexes IX_MaterialItemCodeMap_ItemCode: ItemCodeFIDItemCodeFIDint4
No
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_MaterialItemCodeMap: MaterialItemCodeMapIDPK_MaterialItemCodeMapMaterialItemCodeMapID
Yes
80
IX_MaterialItemCodeMap_Type_CPUTypeMaterialTypeFID, MaterialCPUTypeFID
Yes
80
IX_MaterialItemCodeMap_ItemCodeItemCodeFID80
IX_MaterialItemCodeMap_MaterialCPUTypeMaterialCPUTypeFID, MaterialTypeFID
IX_MaterialItemCodeMap_MaterialTypeMaterialTypeFID, MaterialCPUTypeFID
Foreign Keys Foreign Keys
NameDeleteColumns
FK_MaterialItemCodeMap_ItemCodeItemCodeFID->[dbo].[ItemCode].[ICPriKey]
FK_MaterialItemCodeMap_MaterialCPUTypeMaterialCPUTypeFID->[dbo].[MaterialCPUType].[MaterialCPUTypeID]
FK_MaterialItemCodeMap_MaterialTypeCascadeMaterialTypeFID->[dbo].[MaterialType].[MaterialTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[MaterialItemCodeMap]
(
[MaterialItemCodeMapID] [int] NOT NULL IDENTITY(1, 1),
[MaterialTypeFID] [int] NOT NULL,
[MaterialCPUTypeFID] [int] NOT NULL,
[ItemCodeFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MaterialItemCodeMap] ADD CONSTRAINT [PK_MaterialItemCodeMap] PRIMARY KEY CLUSTERED  ([MaterialItemCodeMapID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MaterialItemCodeMap] ADD CONSTRAINT [IX_MaterialItemCodeMap_Type_CPUType] UNIQUE NONCLUSTERED  ([MaterialTypeFID], [MaterialCPUTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MaterialItemCodeMap_ItemCode] ON [dbo].[MaterialItemCodeMap] ([ItemCodeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MaterialItemCodeMap_MaterialCPUType] ON [dbo].[MaterialItemCodeMap] ([MaterialCPUTypeFID], [MaterialTypeFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MaterialItemCodeMap_MaterialType] ON [dbo].[MaterialItemCodeMap] ([MaterialTypeFID], [MaterialCPUTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MaterialItemCodeMap] ADD CONSTRAINT [FK_MaterialItemCodeMap_ItemCode] FOREIGN KEY ([ItemCodeFID]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[MaterialItemCodeMap] ADD CONSTRAINT [FK_MaterialItemCodeMap_MaterialCPUType] FOREIGN KEY ([MaterialCPUTypeFID]) REFERENCES [dbo].[MaterialCPUType] ([MaterialCPUTypeID])
GO
ALTER TABLE [dbo].[MaterialItemCodeMap] ADD CONSTRAINT [FK_MaterialItemCodeMap_MaterialType] FOREIGN KEY ([MaterialTypeFID]) REFERENCES [dbo].[MaterialType] ([MaterialTypeID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[MaterialItemCodeMap] TO [MssExec]
GRANT INSERT ON  [dbo].[MaterialItemCodeMap] TO [MssExec]
GRANT DELETE ON  [dbo].[MaterialItemCodeMap] TO [MssExec]
GRANT UPDATE ON  [dbo].[MaterialItemCodeMap] TO [MssExec]
GO
Uses
Used By