Tables [dbo].[Device_Groups]
PropertyValue
Row Count (~)0
Created1:20:02 AM Thursday, March 21, 2019
Last Modified1:20:21 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow Nulls
Cluster Primary Key PK_Device_Groups_DeviceID_GroupID: DeviceID\GroupIDForeign Keys FK_Device_Groups_DeviceID_Device_DeviceID: [dbo].[Device].DeviceIDDeviceIDint4
False
Cluster Primary Key PK_Device_Groups_DeviceID_GroupID: DeviceID\GroupIDForeign Keys FK_Device_Groups_GroupID_Groups_GroupID: [dbo].[Groups].GroupIDGroupIDint4
False
StartDatedatetime8
False
EndDatedatetime8
True
KeyNameKey ColumnsUnique
Cluster Primary Key PK_Device_Groups_DeviceID_GroupID: DeviceID\GroupIDPK_Device_Groups_DeviceID_GroupIDDeviceID, GroupID
True
NameDeleteColumns
FK_Device_Groups_DeviceID_Device_DeviceIDCascadeDeviceID->[dbo].[Device].[DeviceID]
FK_Device_Groups_GroupID_Groups_GroupIDGroupID->[dbo].[Groups].[GroupID]
CREATE TABLE [dbo].[Device_Groups]
(
[DeviceID] [int] NOT NULL,
[GroupID] [int] NOT NULL,
[StartDate] [datetime] NOT NULL,
[EndDate] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Device_Groups] ADD CONSTRAINT [PK_Device_Groups_DeviceID_GroupID] PRIMARY KEY CLUSTERED  ([DeviceID], [GroupID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Device_Groups] ADD CONSTRAINT [FK_Device_Groups_DeviceID_Device_DeviceID] FOREIGN KEY ([DeviceID]) REFERENCES [dbo].[Device] ([DeviceID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[Device_Groups] ADD CONSTRAINT [FK_Device_Groups_GroupID_Groups_GroupID] FOREIGN KEY ([GroupID]) REFERENCES [dbo].[Groups] ([GroupID])
GO