Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKB (trunk integration)/HeuristicLab.Services.OKB.DataAccess/3.3/SQL Scripts/Initialize OKB.sql @ 5469

Last change on this file since 5469 was 5397, checked in by swagner, 14 years ago

Worked on OKB (#1174)

  • Property svn:mime-type set to application/octet-stream
File size: 33.6 KB
Line 
1USE [HeuristicLab.OKB]
2GO
3/****** Object:  Table [dbo].[ValueName]    Script Date: 01/31/2011 02:17:22 ******/
4SET ANSI_NULLS ON
5GO
6SET QUOTED_IDENTIFIER ON
7GO
8CREATE TABLE [dbo].[ValueName](
9  [Id] [bigint] IDENTITY(1,1) NOT NULL,
10  [Name] [nvarchar](200) NOT NULL,
11  [Category] [tinyint] NOT NULL,
12  [Type] [tinyint] NOT NULL,
13 CONSTRAINT [PK_ValueName_Id] PRIMARY KEY CLUSTERED
14(
15  [Id] ASC
16)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
17) ON [PRIMARY]
18GO
19/****** Object:  Table [dbo].[ProblemClass]    Script Date: 01/31/2011 02:17:22 ******/
20SET ANSI_NULLS ON
21GO
22SET QUOTED_IDENTIFIER ON
23GO
24CREATE TABLE [dbo].[ProblemClass](
25  [Id] [bigint] IDENTITY(1,1) NOT NULL,
26  [Name] [nvarchar](200) NOT NULL,
27  [Description] [nvarchar](max) NULL,
28 CONSTRAINT [PK_ProblemClass_Id] PRIMARY KEY CLUSTERED
29(
30  [Id] ASC
31)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
32 CONSTRAINT [UQ_ProblemClass_Name] UNIQUE NONCLUSTERED
33(
34  [Name] ASC
35)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
36) ON [PRIMARY]
37GO
38SET IDENTITY_INSERT [dbo].[ProblemClass] ON
39INSERT [dbo].[ProblemClass] ([Id], [Name], [Description]) VALUES (1, N'Unknown', N'Unknown or undefined problem class.')
40SET IDENTITY_INSERT [dbo].[ProblemClass] OFF
41/****** Object:  Table [dbo].[Characteristic]    Script Date: 01/31/2011 02:17:22 ******/
42SET ANSI_NULLS ON
43GO
44SET QUOTED_IDENTIFIER ON
45GO
46CREATE TABLE [dbo].[Characteristic](
47  [Id] [bigint] IDENTITY(1,1) NOT NULL,
48  [Name] [nvarchar](200) NOT NULL,
49  [Type] [tinyint] NOT NULL,
50 CONSTRAINT [PK_Characteristic_Id] PRIMARY KEY CLUSTERED
51(
52  [Id] ASC
53)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
54) ON [PRIMARY]
55GO
56/****** Object:  Table [dbo].[BinaryData]    Script Date: 01/31/2011 02:17:22 ******/
57SET ARITHABORT ON
58GO
59SET CONCAT_NULL_YIELDS_NULL ON
60GO
61SET ANSI_NULLS ON
62GO
63SET ANSI_PADDING ON
64GO
65SET ANSI_WARNINGS ON
66GO
67SET NUMERIC_ROUNDABORT OFF
68GO
69SET ANSI_NULLS ON
70GO
71SET QUOTED_IDENTIFIER ON
72GO
73SET ANSI_PADDING ON
74GO
75SET ARITHABORT ON
76GO
77CREATE TABLE [dbo].[BinaryData](
78  [Id] [bigint] IDENTITY(1,1) NOT NULL,
79  [Data] [varbinary](max) NOT NULL,
80  [Hash]  AS (CONVERT([varbinary](20),hashbytes('SHA1',[Data]),(0))) PERSISTED,
81 CONSTRAINT [PK_BinaryData_Id] PRIMARY KEY CLUSTERED
82(
83  [Id] ASC
84)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
85 CONSTRAINT [UQ_BinaryData_Hash] UNIQUE NONCLUSTERED
86(
87  [Hash] ASC
88)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
89) ON [PRIMARY]
90GO
91SET ANSI_PADDING OFF
92GO
93/****** Object:  Table [dbo].[AlgorithmClass]    Script Date: 01/31/2011 02:17:22 ******/
94SET ANSI_NULLS ON
95GO
96SET QUOTED_IDENTIFIER ON
97GO
98CREATE TABLE [dbo].[AlgorithmClass](
99  [Id] [bigint] IDENTITY(1,1) NOT NULL,
100  [Name] [nvarchar](200) NOT NULL,
101  [Description] [nvarchar](max) NULL,
102 CONSTRAINT [PK_AlgorithmClass_Id] PRIMARY KEY CLUSTERED
103(
104  [Id] ASC
105)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
106 CONSTRAINT [UQ_AlgorithmClass_Name] UNIQUE NONCLUSTERED
107(
108  [Name] ASC
109)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
110) ON [PRIMARY]
111GO
112SET IDENTITY_INSERT [dbo].[AlgorithmClass] ON
113INSERT [dbo].[AlgorithmClass] ([Id], [Name], [Description]) VALUES (1, N'Unknown', N'Unknown or undefined algorithm class.')
114SET IDENTITY_INSERT [dbo].[AlgorithmClass] OFF
115/****** Object:  Table [dbo].[Platform]    Script Date: 01/31/2011 02:17:22 ******/
116SET ANSI_NULLS ON
117GO
118SET QUOTED_IDENTIFIER ON
119GO
120CREATE TABLE [dbo].[Platform](
121  [Id] [bigint] IDENTITY(1,1) NOT NULL,
122  [Name] [nvarchar](200) NOT NULL,
123  [Description] [nvarchar](max) NULL,
124 CONSTRAINT [PK_Platform_Id] PRIMARY KEY CLUSTERED
125(
126  [Id] ASC
127)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
128 CONSTRAINT [UQ_Platform_Name] UNIQUE NONCLUSTERED
129(
130  [Name] ASC
131)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
132) ON [PRIMARY]
133GO
134SET IDENTITY_INSERT [dbo].[Platform] ON
135INSERT [dbo].[Platform] ([Id], [Name], [Description]) VALUES (1, N'Unknown', N'Unknown or undefined platform.')
136INSERT [dbo].[Platform] ([Id], [Name], [Description]) VALUES (2, N'HeuristicLab 3.3', NULL)
137SET IDENTITY_INSERT [dbo].[Platform] OFF
138/****** Object:  Table [dbo].[DataType]    Script Date: 01/31/2011 02:17:22 ******/
139SET ANSI_NULLS ON
140GO
141SET QUOTED_IDENTIFIER ON
142GO
143CREATE TABLE [dbo].[DataType](
144  [Id] [bigint] IDENTITY(1,1) NOT NULL,
145  [PlatformId] [bigint] NOT NULL,
146  [Name] [nvarchar](200) NOT NULL,
147  [TypeName] [nvarchar](max) NOT NULL,
148 CONSTRAINT [PK_DataType_Id] PRIMARY KEY CLUSTERED
149(
150  [Id] ASC
151)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
152) ON [PRIMARY]
153GO
154/****** Object:  Table [dbo].[Problem]    Script Date: 01/31/2011 02:17:22 ******/
155SET ANSI_NULLS ON
156GO
157SET QUOTED_IDENTIFIER ON
158GO
159CREATE TABLE [dbo].[Problem](
160  [Id] [bigint] IDENTITY(1,1) NOT NULL,
161  [ProblemClassId] [bigint] NOT NULL,
162  [PlatformId] [bigint] NOT NULL,
163  [DataTypeId] [bigint] NOT NULL,
164  [BinaryDataId] [bigint] NOT NULL,
165  [Name] [nvarchar](200) NOT NULL,
166  [Description] [nvarchar](max) NULL,
167 CONSTRAINT [PK_Problem_Id] PRIMARY KEY CLUSTERED
168(
169  [Id] ASC
170)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
171 CONSTRAINT [UQ_Problem_Name_PlatformId] UNIQUE NONCLUSTERED
172(
173  [Name] ASC,
174  [PlatformId] ASC
175)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
176) ON [PRIMARY]
177GO
178/****** Object:  Table [dbo].[Algorithm]    Script Date: 01/31/2011 02:17:22 ******/
179SET ANSI_NULLS ON
180GO
181SET QUOTED_IDENTIFIER ON
182GO
183CREATE TABLE [dbo].[Algorithm](
184  [Id] [bigint] IDENTITY(1,1) NOT NULL,
185  [AlgorithmClassId] [bigint] NOT NULL,
186  [PlatformId] [bigint] NOT NULL,
187  [DataTypeId] [bigint] NOT NULL,
188  [BinaryDataId] [bigint] NOT NULL,
189  [Name] [nvarchar](200) NOT NULL,
190  [Description] [nvarchar](max) NULL,
191 CONSTRAINT [PK_Algorithm_Id] PRIMARY KEY CLUSTERED
192(
193  [Id] ASC
194)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
195 CONSTRAINT [UQ_Algorithm_Name_PlatformId] UNIQUE NONCLUSTERED
196(
197  [Name] ASC,
198  [PlatformId] ASC
199)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
200) ON [PRIMARY]
201GO
202/****** Object:  Table [dbo].[CharacteristicValue]    Script Date: 01/31/2011 02:17:22 ******/
203SET ANSI_NULLS ON
204GO
205SET QUOTED_IDENTIFIER ON
206GO
207CREATE TABLE [dbo].[CharacteristicValue](
208  [Id] [bigint] IDENTITY(1,1) NOT NULL,
209  [ProblemId] [bigint] NOT NULL,
210  [CharacteristicId] [bigint] NOT NULL,
211  [DataTypeId] [bigint] NOT NULL,
212  [BoolValue] [bit] SPARSE  NULL,
213  [IntValue] [int] SPARSE  NULL,
214  [LongValue] [bigint] SPARSE  NULL,
215  [FloatValue] [real] SPARSE  NULL,
216  [DoubleValue] [float] SPARSE  NULL,
217  [StringValue] [nvarchar](max) SPARSE  NULL,
218 CONSTRAINT [PK_CharacteristicValue_Id] PRIMARY KEY CLUSTERED
219(
220  [Id] ASC
221)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
222) ON [PRIMARY]
223GO
224/****** Object:  Table [dbo].[AlgorithmUser]    Script Date: 01/31/2011 02:17:22 ******/
225SET ANSI_NULLS ON
226GO
227SET QUOTED_IDENTIFIER ON
228GO
229CREATE TABLE [dbo].[AlgorithmUser](
230  [AlgorithmId] [bigint] NOT NULL,
231  [UserId] [uniqueidentifier] NOT NULL,
232 CONSTRAINT [PK_AlgorithmUser_AlgorithmId_UserId] PRIMARY KEY CLUSTERED
233(
234  [AlgorithmId] ASC,
235  [UserId] ASC
236)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
237) ON [PRIMARY]
238GO
239/****** Object:  Table [dbo].[Run]    Script Date: 01/31/2011 02:17:22 ******/
240SET ANSI_NULLS ON
241GO
242SET QUOTED_IDENTIFIER ON
243GO
244CREATE TABLE [dbo].[Run](
245  [Id] [bigint] IDENTITY(1,1) NOT NULL,
246  [AlgorithmId] [bigint] NOT NULL,
247  [ProblemId] [bigint] NOT NULL,
248  [RandomSeed] [int] NOT NULL,
249  [CreatedDate] [datetime2](7) NOT NULL,
250  [UserId] [uniqueidentifier] NOT NULL,
251  [ClientId] [uniqueidentifier] NOT NULL,
252 CONSTRAINT [PK_Run_Id] PRIMARY KEY CLUSTERED
253(
254  [Id] ASC
255)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
256) ON [PRIMARY]
257GO
258/****** Object:  Table [dbo].[ProblemUser]    Script Date: 01/31/2011 02:17:22 ******/
259SET ANSI_NULLS ON
260GO
261SET QUOTED_IDENTIFIER ON
262GO
263CREATE TABLE [dbo].[ProblemUser](
264  [ProblemId] [bigint] NOT NULL,
265  [UserId] [uniqueidentifier] NOT NULL,
266 CONSTRAINT [PK_ProblemUser_ProblemId_UserId] PRIMARY KEY CLUSTERED
267(
268  [ProblemId] ASC,
269  [UserId] ASC
270)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
271) ON [PRIMARY]
272GO
273/****** Object:  Table [dbo].[Value]    Script Date: 01/31/2011 02:17:22 ******/
274SET ANSI_NULLS ON
275GO
276SET QUOTED_IDENTIFIER ON
277GO
278CREATE TABLE [dbo].[Value](
279  [Id] [bigint] IDENTITY(1,1) NOT NULL,
280  [RunId] [bigint] NOT NULL,
281  [ValueNameId] [bigint] NOT NULL,
282  [DataTypeId] [bigint] NOT NULL,
283  [BoolValue] [bit] SPARSE  NULL,
284  [IntValue] [int] SPARSE  NULL,
285  [LongValue] [bigint] SPARSE  NULL,
286  [FloatValue] [real] SPARSE  NULL,
287  [DoubleValue] [float] SPARSE  NULL,
288  [StringValue] [nvarchar](max) SPARSE  NULL,
289  [BinaryDataId] [bigint] SPARSE  NULL,
290 CONSTRAINT [PK_Value_Id] PRIMARY KEY CLUSTERED
291(
292  [Id] ASC
293)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
294) ON [PRIMARY]
295GO
296/****** Object:  ForeignKey [FK_AlgorithmClass_Algorithm]    Script Date: 01/31/2011 02:17:22 ******/
297ALTER TABLE [dbo].[Algorithm]  WITH CHECK ADD  CONSTRAINT [FK_AlgorithmClass_Algorithm] FOREIGN KEY([AlgorithmClassId])
298REFERENCES [dbo].[AlgorithmClass] ([Id])
299GO
300ALTER TABLE [dbo].[Algorithm] CHECK CONSTRAINT [FK_AlgorithmClass_Algorithm]
301GO
302/****** Object:  ForeignKey [FK_BinaryData_Algorithm]    Script Date: 01/31/2011 02:17:22 ******/
303ALTER TABLE [dbo].[Algorithm]  WITH CHECK ADD  CONSTRAINT [FK_BinaryData_Algorithm] FOREIGN KEY([BinaryDataId])
304REFERENCES [dbo].[BinaryData] ([Id])
305GO
306ALTER TABLE [dbo].[Algorithm] CHECK CONSTRAINT [FK_BinaryData_Algorithm]
307GO
308/****** Object:  ForeignKey [FK_DataType_Algorithm]    Script Date: 01/31/2011 02:17:22 ******/
309ALTER TABLE [dbo].[Algorithm]  WITH CHECK ADD  CONSTRAINT [FK_DataType_Algorithm] FOREIGN KEY([DataTypeId])
310REFERENCES [dbo].[DataType] ([Id])
311GO
312ALTER TABLE [dbo].[Algorithm] CHECK CONSTRAINT [FK_DataType_Algorithm]
313GO
314/****** Object:  ForeignKey [FK_Platform_Algorithm]    Script Date: 01/31/2011 02:17:22 ******/
315ALTER TABLE [dbo].[Algorithm]  WITH CHECK ADD  CONSTRAINT [FK_Platform_Algorithm] FOREIGN KEY([PlatformId])
316REFERENCES [dbo].[Platform] ([Id])
317GO
318ALTER TABLE [dbo].[Algorithm] CHECK CONSTRAINT [FK_Platform_Algorithm]
319GO
320/****** Object:  ForeignKey [FK_Algorithm_AlgorithmUser]    Script Date: 01/31/2011 02:17:22 ******/
321ALTER TABLE [dbo].[AlgorithmUser]  WITH CHECK ADD  CONSTRAINT [FK_Algorithm_AlgorithmUser] FOREIGN KEY([AlgorithmId])
322REFERENCES [dbo].[Algorithm] ([Id])
323ON UPDATE CASCADE
324ON DELETE CASCADE
325GO
326ALTER TABLE [dbo].[AlgorithmUser] CHECK CONSTRAINT [FK_Algorithm_AlgorithmUser]
327GO
328/****** Object:  ForeignKey [FK_Characteristic_CharacteristicValue]    Script Date: 01/31/2011 02:17:22 ******/
329ALTER TABLE [dbo].[CharacteristicValue]  WITH CHECK ADD  CONSTRAINT [FK_Characteristic_CharacteristicValue] FOREIGN KEY([CharacteristicId])
330REFERENCES [dbo].[Characteristic] ([Id])
331GO
332ALTER TABLE [dbo].[CharacteristicValue] CHECK CONSTRAINT [FK_Characteristic_CharacteristicValue]
333GO
334/****** Object:  ForeignKey [FK_DataType_CharacteristicValue]    Script Date: 01/31/2011 02:17:22 ******/
335ALTER TABLE [dbo].[CharacteristicValue]  WITH CHECK ADD  CONSTRAINT [FK_DataType_CharacteristicValue] FOREIGN KEY([DataTypeId])
336REFERENCES [dbo].[DataType] ([Id])
337GO
338ALTER TABLE [dbo].[CharacteristicValue] CHECK CONSTRAINT [FK_DataType_CharacteristicValue]
339GO
340/****** Object:  ForeignKey [FK_Problem_CharacteristicValue]    Script Date: 01/31/2011 02:17:22 ******/
341ALTER TABLE [dbo].[CharacteristicValue]  WITH CHECK ADD  CONSTRAINT [FK_Problem_CharacteristicValue] FOREIGN KEY([ProblemId])
342REFERENCES [dbo].[Problem] ([Id])
343GO
344ALTER TABLE [dbo].[CharacteristicValue] CHECK CONSTRAINT [FK_Problem_CharacteristicValue]
345GO
346/****** Object:  ForeignKey [FK_Platform_DataType]    Script Date: 01/31/2011 02:17:22 ******/
347ALTER TABLE [dbo].[DataType]  WITH CHECK ADD  CONSTRAINT [FK_Platform_DataType] FOREIGN KEY([PlatformId])
348REFERENCES [dbo].[Platform] ([Id])
349GO
350ALTER TABLE [dbo].[DataType] CHECK CONSTRAINT [FK_Platform_DataType]
351GO
352/****** Object:  ForeignKey [FK_BinaryData_Problem]    Script Date: 01/31/2011 02:17:22 ******/
353ALTER TABLE [dbo].[Problem]  WITH CHECK ADD  CONSTRAINT [FK_BinaryData_Problem] FOREIGN KEY([BinaryDataId])
354REFERENCES [dbo].[BinaryData] ([Id])
355GO
356ALTER TABLE [dbo].[Problem] CHECK CONSTRAINT [FK_BinaryData_Problem]
357GO
358/****** Object:  ForeignKey [FK_DataType_Problem]    Script Date: 01/31/2011 02:17:22 ******/
359ALTER TABLE [dbo].[Problem]  WITH CHECK ADD  CONSTRAINT [FK_DataType_Problem] FOREIGN KEY([DataTypeId])
360REFERENCES [dbo].[DataType] ([Id])
361GO
362ALTER TABLE [dbo].[Problem] CHECK CONSTRAINT [FK_DataType_Problem]
363GO
364/****** Object:  ForeignKey [FK_Platform_Problem]    Script Date: 01/31/2011 02:17:22 ******/
365ALTER TABLE [dbo].[Problem]  WITH CHECK ADD  CONSTRAINT [FK_Platform_Problem] FOREIGN KEY([PlatformId])
366REFERENCES [dbo].[Platform] ([Id])
367GO
368ALTER TABLE [dbo].[Problem] CHECK CONSTRAINT [FK_Platform_Problem]
369GO
370/****** Object:  ForeignKey [FK_ProblemClass_Problem]    Script Date: 01/31/2011 02:17:22 ******/
371ALTER TABLE [dbo].[Problem]  WITH CHECK ADD  CONSTRAINT [FK_ProblemClass_Problem] FOREIGN KEY([ProblemClassId])
372REFERENCES [dbo].[ProblemClass] ([Id])
373GO
374ALTER TABLE [dbo].[Problem] CHECK CONSTRAINT [FK_ProblemClass_Problem]
375GO
376/****** Object:  ForeignKey [FK_Problem_ProblemUser]    Script Date: 01/31/2011 02:17:22 ******/
377ALTER TABLE [dbo].[ProblemUser]  WITH CHECK ADD  CONSTRAINT [FK_Problem_ProblemUser] FOREIGN KEY([ProblemId])
378REFERENCES [dbo].[Problem] ([Id])
379ON UPDATE CASCADE
380ON DELETE CASCADE
381GO
382ALTER TABLE [dbo].[ProblemUser] CHECK CONSTRAINT [FK_Problem_ProblemUser]
383GO
384/****** Object:  ForeignKey [FK_Algorithm_Run]    Script Date: 01/31/2011 02:17:22 ******/
385ALTER TABLE [dbo].[Run]  WITH CHECK ADD  CONSTRAINT [FK_Algorithm_Run] FOREIGN KEY([AlgorithmId])
386REFERENCES [dbo].[Algorithm] ([Id])
387GO
388ALTER TABLE [dbo].[Run] CHECK CONSTRAINT [FK_Algorithm_Run]
389GO
390/****** Object:  ForeignKey [FK_Problem_Run]    Script Date: 01/31/2011 02:17:22 ******/
391ALTER TABLE [dbo].[Run]  WITH CHECK ADD  CONSTRAINT [FK_Problem_Run] FOREIGN KEY([ProblemId])
392REFERENCES [dbo].[Problem] ([Id])
393GO
394ALTER TABLE [dbo].[Run] CHECK CONSTRAINT [FK_Problem_Run]
395GO
396/****** Object:  ForeignKey [FK_BinaryData_Value]    Script Date: 01/31/2011 02:17:22 ******/
397ALTER TABLE [dbo].[Value]  WITH CHECK ADD  CONSTRAINT [FK_BinaryData_Value] FOREIGN KEY([BinaryDataId])
398REFERENCES [dbo].[BinaryData] ([Id])
399GO
400ALTER TABLE [dbo].[Value] CHECK CONSTRAINT [FK_BinaryData_Value]
401GO
402/****** Object:  ForeignKey [FK_DataType_Value]    Script Date: 01/31/2011 02:17:22 ******/
403ALTER TABLE [dbo].[Value]  WITH CHECK ADD  CONSTRAINT [FK_DataType_Value] FOREIGN KEY([DataTypeId])
404REFERENCES [dbo].[DataType] ([Id])
405GO
406ALTER TABLE [dbo].[Value] CHECK CONSTRAINT [FK_DataType_Value]
407GO
408/****** Object:  ForeignKey [FK_Run_Value]    Script Date: 01/31/2011 02:17:22 ******/
409ALTER TABLE [dbo].[Value]  WITH CHECK ADD  CONSTRAINT [FK_Run_Value] FOREIGN KEY([RunId])
410REFERENCES [dbo].[Run] ([Id])
411GO
412ALTER TABLE [dbo].[Value] CHECK CONSTRAINT [FK_Run_Value]
413GO
414/****** Object:  ForeignKey [FK_ValueName_Value]    Script Date: 01/31/2011 02:17:22 ******/
415ALTER TABLE [dbo].[Value]  WITH CHECK ADD  CONSTRAINT [FK_ValueName_Value] FOREIGN KEY([ValueNameId])
416REFERENCES [dbo].[ValueName] ([Id])
417GO
418ALTER TABLE [dbo].[Value] CHECK CONSTRAINT [FK_ValueName_Value]
419GO
Note: See TracBrowser for help on using the repository browser.