[dbo].[XmlSystemDataTypeMap]
CREATE TABLE [dbo].[XmlSystemDataTypeMap]
(
[XmlSystemDataTypeMapID] [int] NOT NULL IDENTITY(1, 1),
[XmlSystemFID] [int] NOT NULL,
[XmlSystemDataTypeFID] [int] NOT NULL,
[Name] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ClearPreviousXmlErrors] [bit] NOT NULL CONSTRAINT [DF_XmlSystemDataTypeMap_ClearPreviousXmlErrors] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlSystemDataTypeMap] ADD CONSTRAINT [PK_XmlSystemDataTypeMap] PRIMARY KEY CLUSTERED ([XmlSystemDataTypeMapID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlSystemDataTypeMap] ADD CONSTRAINT [IX_XmlSystemDataTypeMap_Name] UNIQUE NONCLUSTERED ([Name]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlSystemDataTypeMap] ADD CONSTRAINT [FK_XmlSystemDataTypeMap_XmlSystemDataType] FOREIGN KEY ([XmlSystemDataTypeFID]) REFERENCES [dbo].[XmlSystemDataType] ([XmlSystemDataTypeID])
GO
ALTER TABLE [dbo].[XmlSystemDataTypeMap] ADD CONSTRAINT [FK_XmlSystemDataTypeMap_XmlSystem] FOREIGN KEY ([XmlSystemFID]) REFERENCES [dbo].[XmlSystem] ([XmlSystemID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[XmlSystemDataTypeMap] TO [MssExec]
GRANT INSERT ON [dbo].[XmlSystemDataTypeMap] TO [MssExec]
GRANT DELETE ON [dbo].[XmlSystemDataTypeMap] TO [MssExec]
GRANT UPDATE ON [dbo].[XmlSystemDataTypeMap] TO [MssExec]
GO
EXEC sp_addextendedproperty N'Description', N'Maps the type of data a given XmlSystem deals with.', 'SCHEMA', N'dbo', 'TABLE', N'XmlSystemDataTypeMap', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'Determines if all previous errors for this data type are cleared or not when processing this data type.', 'SCHEMA', N'dbo', 'TABLE', N'XmlSystemDataTypeMap', 'COLUMN', N'ClearPreviousXmlErrors'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The name of the system data type mapping.', 'SCHEMA', N'dbo', 'TABLE', N'XmlSystemDataTypeMap', 'COLUMN', N'Name'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The XmlSystemDataType foreign key.', 'SCHEMA', N'dbo', 'TABLE', N'XmlSystemDataTypeMap', 'COLUMN', N'XmlSystemDataTypeFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The primary key.', 'SCHEMA', N'dbo', 'TABLE', N'XmlSystemDataTypeMap', 'COLUMN', N'XmlSystemDataTypeMapID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The XmlSystem foreign key.', 'SCHEMA', N'dbo', 'TABLE', N'XmlSystemDataTypeMap', 'COLUMN', N'XmlSystemFID'
GO