Tables [dbo].[DeviceConsumableData]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created1:20:02 AM Thursday, March 21, 2019
Last Modified1:20:22 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_DeviceConsumableData_DeviceID_ConsumableHashCode: DeviceID\ConsumableHashCodeForeign Keys FK_DeviceConsumableData_DeviceID_Device_DeviceID: [dbo].[Device].DeviceIDDeviceIDint4
False
Cluster Primary Key PK_DeviceConsumableData_DeviceID_ConsumableHashCode: DeviceID\ConsumableHashCodeConsumableHashCodeint4
False
ParameterTypesmallint2
True
ConsumableTypesmallint2
True
ConsumableNamenvarchar(100)200
True
ConsumableMaxCapacityint4
True
ConsumableLevelint4
True
ConsumableRemainingfloat8
True
IsNormalizedbit1
False
((0))
ConsumableTypeExtendedsmallint2
False
((0))
ConsumableColorantTypevarchar(50)50
True
ConsumableSerialNumbervarchar(50)50
True
ConsumableOEMPartNovarchar(50)50
True
ConsumableYieldint4
True
CoverageFactorfloat8
True
LastUpdateDatedatetime8
True
ConsumableVendorPartNovarchar(50)50
True
ConsumableIndexint4
True
Foreign Keys FK_DeviceConsumableData_RefSupplyDataID_SuppliesData_ID: [dbo].[SuppliesData].RefSupplyDataIDRefSupplyDataIDint4
True
UserDatabit1
True
Notesnvarchar(500)1000
True
ColorantIndexsmallint2
True
EstimatedEmptyDatedatetime8
True
InvalidSupplyAuditssmallint2
False
((0))
EstimatedPagesint4
True
ExtendedYieldint4
True
ExtendedLevelfloat8
True
CartridgeVendornvarchar(50)100
True
VolumeReferenceValueint4
True
VolumeReferenceTypetinyint1
True
Foreign Keys FK_DeviceConsumableData_VolumeReferenceAuditId_Audit_AuditID: [dbo].[Audit].VolumeReferenceAuditIdVolumeReferenceAuditIdint4
True
KeyNameKey ColumnsUnique
Cluster Primary Key PK_DeviceConsumableData_DeviceID_ConsumableHashCode: DeviceID\ConsumableHashCodePK_DeviceConsumableData_DeviceID_ConsumableHashCodeDeviceID, ConsumableHashCode
True
NameNo CheckDeleteColumns
FK_DeviceConsumableData_DeviceID_Device_DeviceID
True
CascadeDeviceID->[dbo].[Device].[DeviceID]
FK_DeviceConsumableData_RefSupplyDataID_SuppliesData_ID
True
RefSupplyDataID->[dbo].[SuppliesData].[ID]
FK_DeviceConsumableData_VolumeReferenceAuditId_Audit_AuditID
True
VolumeReferenceAuditId->[dbo].[Audit].[AuditID]
CREATE TABLE [dbo].[DeviceConsumableData]
(
[DeviceID] [int] NOT NULL,
[ConsumableHashCode] [int] NOT NULL,
[ParameterType] [smallint] NULL,
[ConsumableType] [smallint] NULL,
[ConsumableName] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ConsumableMaxCapacity] [int] NULL,
[ConsumableLevel] [int] NULL,
[ConsumableRemaining] [float] NULL,
[IsNormalized] [bit] NOT NULL CONSTRAINT [DF_DeviceConsumableData_IsNormalized] DEFAULT ((0)),
[ConsumableTypeExtended] [smallint] NOT NULL CONSTRAINT [DF_DeviceConsumableData_ConsumableTypeExtended] DEFAULT ((0)),
[ConsumableColorantType] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ConsumableSerialNumber] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ConsumableOEMPartNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ConsumableYield] [int] NULL,
[CoverageFactor] [float] NULL,
[LastUpdateDate] [datetime] NULL,
[ConsumableVendorPartNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ConsumableIndex] [int] NULL,
[RefSupplyDataID] [int] NULL,
[UserData] [bit] NULL,
[Notes] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ColorantIndex] [smallint] NULL,
[EstimatedEmptyDate] [datetime] NULL,
[InvalidSupplyAudits] [smallint] NOT NULL CONSTRAINT [DF_DeviceConsumableData_InvalidSupplyAudits] DEFAULT ((0)),
[EstimatedPages] [int] NULL,
[ExtendedYield] [int] NULL,
[ExtendedLevel] [float] NULL,
[CartridgeVendor] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VolumeReferenceValue] [int] NULL,
[VolumeReferenceType] [tinyint] NULL,
[VolumeReferenceAuditId] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DeviceConsumableData] ADD CONSTRAINT [PK_DeviceConsumableData_DeviceID_ConsumableHashCode] PRIMARY KEY CLUSTERED  ([DeviceID], [ConsumableHashCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DeviceConsumableData] WITH NOCHECK ADD CONSTRAINT [FK_DeviceConsumableData_DeviceID_Device_DeviceID] FOREIGN KEY ([DeviceID]) REFERENCES [dbo].[Device] ([DeviceID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[DeviceConsumableData] WITH NOCHECK ADD CONSTRAINT [FK_DeviceConsumableData_RefSupplyDataID_SuppliesData_ID] FOREIGN KEY ([RefSupplyDataID]) REFERENCES [dbo].[SuppliesData] ([ID])
GO
ALTER TABLE [dbo].[DeviceConsumableData] WITH NOCHECK ADD CONSTRAINT [FK_DeviceConsumableData_VolumeReferenceAuditId_Audit_AuditID] FOREIGN KEY ([VolumeReferenceAuditId]) REFERENCES [dbo].[Audit] ([AuditID])
GO