Tables [dbo].[PlasticOriginMapping]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)12
Created4:09:41 PM Thursday, December 6, 2018
Last Modified4:09:41 PM Thursday, December 6, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_PlasticOriginMapping: OriginMappingIDOriginMappingIDint4
No
1 - 1
Cluster Key IX_PlasticOriginMapping_Origin_Provider: OriginFID\ProviderTypeFIDForeign Keys FK_PlasticOriginMapping_OriginFID: [dbo].[PlasticOrigin].OriginFIDOriginFIDint4
No
Cluster Key IX_PlasticOriginMapping_Origin_Provider: OriginFID\ProviderTypeFIDForeign Keys FK_PlasticOriginMapping_ProviderTypeFID: [dbo].[PlasticProviderType].ProviderTypeFIDIndexes IX_PlasticOriginMapping_ExternalCode: ProviderTypeFID\ExternalCodeProviderTypeFIDint4
No
Indexes IX_PlasticOriginMapping_ExternalCode: ProviderTypeFID\ExternalCodeExternalCodevarchar(50)50
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_PlasticOriginMapping: OriginMappingIDPK_PlasticOriginMappingOriginMappingID
Yes
IX_PlasticOriginMapping_ExternalCodeProviderTypeFID, ExternalCode
Yes
Cluster Key IX_PlasticOriginMapping_Origin_Provider: OriginFID\ProviderTypeFIDIX_PlasticOriginMapping_Origin_ProviderOriginFID, ProviderTypeFID
Yes
Foreign Keys Foreign Keys
NameColumns
FK_PlasticOriginMapping_OriginFIDOriginFID->[dbo].[PlasticOrigin].[OriginID]
FK_PlasticOriginMapping_ProviderTypeFIDProviderTypeFID->[dbo].[PlasticProviderType].[ProviderTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[PlasticOriginMapping]
(
[OriginMappingID] [int] NOT NULL IDENTITY(1, 1),
[OriginFID] [int] NOT NULL,
[ProviderTypeFID] [int] NOT NULL,
[ExternalCode] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticOriginMapping] ADD CONSTRAINT [PK_PlasticOriginMapping] PRIMARY KEY NONCLUSTERED  ([OriginMappingID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticOriginMapping] ADD CONSTRAINT [IX_PlasticOriginMapping_Origin_Provider] UNIQUE CLUSTERED  ([OriginFID], [ProviderTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticOriginMapping] ADD CONSTRAINT [IX_PlasticOriginMapping_ExternalCode] UNIQUE NONCLUSTERED  ([ProviderTypeFID], [ExternalCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticOriginMapping] ADD CONSTRAINT [FK_PlasticOriginMapping_OriginFID] FOREIGN KEY ([OriginFID]) REFERENCES [dbo].[PlasticOrigin] ([OriginID])
GO
ALTER TABLE [dbo].[PlasticOriginMapping] ADD CONSTRAINT [FK_PlasticOriginMapping_ProviderTypeFID] FOREIGN KEY ([ProviderTypeFID]) REFERENCES [dbo].[PlasticProviderType] ([ProviderTypeID])
GO
GRANT SELECT ON  [dbo].[PlasticOriginMapping] TO [MssExec]
GRANT INSERT ON  [dbo].[PlasticOriginMapping] TO [MssExec]
GRANT DELETE ON  [dbo].[PlasticOriginMapping] TO [MssExec]
GRANT UPDATE ON  [dbo].[PlasticOriginMapping] TO [MssExec]
GO
Uses