Tables [dbo].[RateMatrixRate]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)180
Created5:33:10 PM Wednesday, January 2, 2008
Last Modified9:56:11 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_RateMatrixRate: RateMatrixRateIDRateMatrixRateIDint4
No
1 - 1
Foreign Keys FK_RateMatrixRate_RateMatrixRangeX: [dbo].[RateMatrixRangeX].RateMatrixRangeXFIDIndexes IX_RateMatrixRate_RateMatrixXY: RateMatrixRangeXFID\RateMatrixRangeYFIDRateMatrixRangeXFIDint4
No
Foreign Keys FK_RateMatrixRate_RateMatrixRangeY: [dbo].[RateMatrixRangeY].RateMatrixRangeYFIDIndexes IX_RateMatrixRate_RateMatrixXY: RateMatrixRangeXFID\RateMatrixRangeYFIDRateMatrixRangeYFIDint4
No
Ratedecimal(12,2)9
No
BreakpointXdecimal(12,3)9
Yes
BreakpointYdecimal(12,3)9
Yes
ForeignIDvarchar(64)64
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_RateMatrixRate: RateMatrixRateIDPK_RateMatrixRateRateMatrixRateID
Yes
80
IX_RateMatrixRate_RateMatrixXYRateMatrixRangeXFID, RateMatrixRangeYFID
Yes
80
Check Constraints Check Constraints
NameConstraint
CK_RateMatrixRate_ValidBreakpoints((1)=[dbo].[RateMatrixRateValidRanges]([RateMatrixRangeXFID],[BreakpointX],[RateMatrixRangeYFID],[BreakpointY]))
Foreign Keys Foreign Keys
NameDeleteColumns
FK_RateMatrixRate_RateMatrixRangeXCascadeRateMatrixRangeXFID->[dbo].[RateMatrixRangeX].[RateMatrixRangeXID]
FK_RateMatrixRate_RateMatrixRangeYCascadeRateMatrixRangeYFID->[dbo].[RateMatrixRangeY].[RateMatrixRangeYID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[RateMatrixRate]
(
[RateMatrixRateID] [int] NOT NULL IDENTITY(1, 1),
[RateMatrixRangeXFID] [int] NOT NULL,
[RateMatrixRangeYFID] [int] NOT NULL,
[Rate] [decimal] (12, 2) NOT NULL,
[BreakpointX] [decimal] (12, 3) NULL,
[BreakpointY] [decimal] (12, 3) NULL,
[ForeignID] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RateMatrixRate] ADD CONSTRAINT [CK_RateMatrixRate_ValidBreakpoints] CHECK (((1)=[dbo].[RateMatrixRateValidRanges]([RateMatrixRangeXFID],[BreakpointX],[RateMatrixRangeYFID],[BreakpointY])))
GO
ALTER TABLE [dbo].[RateMatrixRate] ADD CONSTRAINT [PK_RateMatrixRate] PRIMARY KEY CLUSTERED  ([RateMatrixRateID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RateMatrixRate] ADD CONSTRAINT [IX_RateMatrixRate_RateMatrixXY] UNIQUE NONCLUSTERED  ([RateMatrixRangeXFID], [RateMatrixRangeYFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RateMatrixRate] ADD CONSTRAINT [FK_RateMatrixRate_RateMatrixRangeX] FOREIGN KEY ([RateMatrixRangeXFID]) REFERENCES [dbo].[RateMatrixRangeX] ([RateMatrixRangeXID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[RateMatrixRate] ADD CONSTRAINT [FK_RateMatrixRate_RateMatrixRangeY] FOREIGN KEY ([RateMatrixRangeYFID]) REFERENCES [dbo].[RateMatrixRangeY] ([RateMatrixRangeYID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[RateMatrixRate] TO [MssExec]
GRANT INSERT ON  [dbo].[RateMatrixRate] TO [MssExec]
GRANT DELETE ON  [dbo].[RateMatrixRate] TO [MssExec]
GRANT UPDATE ON  [dbo].[RateMatrixRate] TO [MssExec]
GO
Uses