Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql	(revision 6721)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql	(revision 6723)
@@ -4,5 +4,5 @@
 SET ARITHABORT ON
 CREATE TABLE [dbo].[AssignedResources](
-  [ResourceId] UniqueIdentifier NOT NULL, 
+  [ResourceId] UniqueIdentifier NOT NULL,
   [TaskId] UniqueIdentifier NOT NULL,   
   CONSTRAINT [PK_dbo.ResourceIdTaskId] PRIMARY KEY ([ResourceId], [TaskId])
@@ -54,5 +54,5 @@
   [FinishWhenChildJobsFinished] Bit, 
   [Command] VarChar(30), 
-  [HiveExperimentId] UniqueIdentifier NOT NULL, 
+  [JobId] UniqueIdentifier NOT NULL, 
   [IsPrivileged] Bit, 
   CONSTRAINT [PK_dbo.Task] PRIMARY KEY ([TaskId])
@@ -68,6 +68,6 @@
   CONSTRAINT [PK_dbo.Downtime] PRIMARY KEY ([DowntimeId])
   )
-CREATE TABLE [dbo].[HiveExperiment](
-  [HiveExperimentId] UniqueIdentifier NOT NULL, 
+CREATE TABLE [dbo].[Job](
+  [JobId] UniqueIdentifier NOT NULL, 
   [Name] VarChar(MAX), 
   [Description] VarChar(MAX), 
@@ -77,5 +77,5 @@
   [LastAccessed] DateTime, 
   [IsHiveEngine] Bit, 
-  CONSTRAINT [PK_dbo.HiveExperiment] PRIMARY KEY ([HiveExperimentId])
+  CONSTRAINT [PK_dbo.Job] PRIMARY KEY ([JobId])
   )
 CREATE TABLE [dbo].[TaskData](
@@ -102,10 +102,10 @@
   CONSTRAINT [PK_dbo.StateLog] PRIMARY KEY ([StateLogId])
   )
-CREATE TABLE [dbo].[HiveExperimentPermission](
-  [HiveExperimentId] UniqueIdentifier NOT NULL, 
+CREATE TABLE [dbo].[JobPermission](
+  [JobId] UniqueIdentifier NOT NULL, 
   [GrantedUserId] UniqueIdentifier NOT NULL, 
   [GrantedByUserId] UniqueIdentifier NOT NULL, 
   [Permission] VarChar(15) NOT NULL, 
-  CONSTRAINT [PK_dbo.HiveExperimentPermission] PRIMARY KEY ([HiveExperimentId], [GrantedUserId])
+  CONSTRAINT [PK_dbo.JobPermission] PRIMARY KEY ([JobId], [GrantedUserId])
   )
 CREATE TABLE [Lifecycle](
@@ -159,5 +159,5 @@
   ADD CONSTRAINT [Task_Task] FOREIGN KEY ([ParentTaskId]) REFERENCES [dbo].[Task]([TaskId])
 ALTER TABLE [dbo].[Task]
-  ADD CONSTRAINT [HiveExperiment_Job] FOREIGN KEY ([HiveExperimentId]) REFERENCES [dbo].[HiveExperiment]([HiveExperimentId])
+  ADD CONSTRAINT [Job_Job] FOREIGN KEY ([JobId]) REFERENCES [dbo].[Job]([JobId])
 ALTER TABLE [dbo].[Downtime]
   ADD CONSTRAINT [Resource_Downtime] FOREIGN KEY ([ResourceId]) REFERENCES [dbo].[Resource]([ResourceId])
@@ -170,6 +170,6 @@
 ALTER TABLE [dbo].[StateLog]
   ADD CONSTRAINT [Resource_StateLog] FOREIGN KEY ([SlaveId]) REFERENCES [dbo].[Resource]([ResourceId])
-ALTER TABLE [dbo].[HiveExperimentPermission]
-  ADD CONSTRAINT [HiveExperiment_HiveExperimentPermission] FOREIGN KEY ([HiveExperimentId]) REFERENCES [dbo].[HiveExperiment]([HiveExperimentId])
+ALTER TABLE [dbo].[JobPermission]
+  ADD CONSTRAINT [Job_JobPermission] FOREIGN KEY ([JobId]) REFERENCES [dbo].[Job]([JobId])
 ALTER TABLE [UserStatistics]
   ADD CONSTRAINT [Statistics_UserStatistics] FOREIGN KEY ([StatisticsId]) REFERENCES [Statistics]([StatisticsId])
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Prepare Hive Database.sql
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Prepare Hive Database.sql	(revision 6721)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Prepare Hive Database.sql	(revision 6723)
@@ -74,13 +74,13 @@
 ALTER TABLE dbo.Downtime WITH NOCHECK ADD CONSTRAINT [DF_Downtime_DowntimeId] DEFAULT (NEWSEQUENTIALID()) FOR DowntimeId;
 
-ALTER TABLE dbo.HiveExperiment ALTER COLUMN HiveExperimentId ADD ROWGUIDCOL;
-ALTER TABLE dbo.HiveExperiment WITH NOCHECK ADD CONSTRAINT [DF_HiveExperiment_HiveExperimentId] DEFAULT (NEWSEQUENTIALID()) FOR HiveExperimentId;
+ALTER TABLE dbo.Job ALTER COLUMN JobId ADD ROWGUIDCOL;
+ALTER TABLE dbo.Job WITH NOCHECK ADD CONSTRAINT [DF_Job_JobId] DEFAULT (NEWSEQUENTIALID()) FOR JobId;
 
 ALTER TABLE dbo.StateLog ALTER COLUMN StateLogId ADD ROWGUIDCOL;
 ALTER TABLE dbo.StateLog WITH NOCHECK ADD CONSTRAINT [DF_StateLog_StateLogId] DEFAULT (NEWSEQUENTIALID()) FOR StateLogId;
 
-ALTER TABLE [dbo].[HiveExperimentPermission]  DROP  CONSTRAINT [HiveExperiment_HiveExperimentPermission]
-ALTER TABLE [dbo].[HiveExperimentPermission]  WITH CHECK ADD CONSTRAINT [HiveExperiment_HiveExperimentPermission] FOREIGN KEY([HiveExperimentId])
-REFERENCES [dbo].[HiveExperiment] ([HiveExperimentId])
+ALTER TABLE [dbo].[JobPermission]  DROP  CONSTRAINT [Job_JobPermission]
+ALTER TABLE [dbo].[JobPermission]  WITH CHECK ADD CONSTRAINT [Job_JobPermission] FOREIGN KEY([JobId])
+REFERENCES [dbo].[Job] ([JobId])
 ON UPDATE CASCADE
 ON DELETE CASCADE
@@ -161,5 +161,5 @@
 /* triggers */
 GO
-/****** Object:  Trigger [dbo].[tr_HiveExperimentDeleteCascade]    Script Date: 04/19/2011 16:31:53 ******/
+/****** Object:  Trigger [dbo].[tr_JobDeleteCascade]    Script Date: 04/19/2011 16:31:53 ******/
 SET ANSI_NULLS ON
 GO
@@ -174,8 +174,8 @@
 --              is not compatible with cascading deletes.
 -- =============================================
-CREATE TRIGGER [dbo].[tr_HiveExperimentDeleteCascade] ON [dbo].[HiveExperiment] INSTEAD OF DELETE AS 
+CREATE TRIGGER [dbo].[tr_JobDeleteCascade] ON [dbo].[Job] INSTEAD OF DELETE AS 
 BEGIN
-	DELETE Task FROM deleted, Task WHERE deleted.HiveExperimentId = Task.HiveExperimentId
-	DELETE HiveExperiment FROM deleted, HiveExperiment WHERE deleted.HiveExperimentId = HiveExperiment.HiveExperimentId
+	DELETE Task FROM deleted, Task WHERE deleted.JobId = Task.JobId
+	DELETE Job FROM deleted, Job WHERE deleted.JobId = Job.JobId
 END
 GO
@@ -186,5 +186,5 @@
 -- Description:	Recursively deletes all child-jobs of a job when it is deleted. (Source: http://devio.wordpress.com/2008/05/23/recursive-delete-in-sql-server/)
 -- =============================================
-CREATE TRIGGER [dbo].[tr_JobDeleteCascade] ON [dbo].[Task] INSTEAD OF DELETE AS 
+CREATE TRIGGER [dbo].[tr_TaskDeleteCascade] ON [dbo].[Task] INSTEAD OF DELETE AS 
 BEGIN
 	-- add statistics
@@ -197,9 +197,9 @@
 	FROM 
 		deleted j, 
-		HiveExperiment he, 
+		Job he, 
 		view_FirstState fs, 
 		view_LastState ls
 	WHERE 
-		he.HiveExperimentId = j.HiveExperimentId AND 
+		he.JobId = j.JobId AND 
 		fs.TaskId = j.TaskId AND 
 		ls.TaskId = j.TaskId
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Query Jobs.sql
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Query Jobs.sql	(revision 6721)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Query Jobs.sql	(revision 6723)
@@ -16,12 +16,12 @@
       ,j.[FinishWhenChildJobsFinished]
       ,j.[ParentTaskId]
-      , he.HiveExperimentId
+      , he.JobId
   FROM 
 	[HeuristicLab.Hive-3.3].[dbo].[Task] j
-	,[HeuristicLab.Hive-3.3].[dbo].[HiveExperiment] he
+	,[HeuristicLab.Hive-3.3].[dbo].[Job] he
 	,[HeuristicLab.Authentication].dbo.aspnet_Users u
 	,[HeuristicLab.Hive-3.3].dbo.TaskData jd
   WHERE
-	j.HiveExperimentId = he.HiveExperimentId
+	j.JobId = he.JobId
 	AND j.TaskId = jd.TaskId
 	AND he.OwnerUserId = u.UserId
