Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml	(revision 9545)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml	(revision 9546)
@@ -277,5 +277,5 @@
       <Column Name="ClientId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
       <Column Name="Time" Type="System.DateTime" DbType="DateTime NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
-      <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier NULL" CanBeNull="true" />
+      <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier NULL" IsPrimaryKey="true" CanBeNull="false" />
       <Column Name="NumUsedCores" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
       <Column Name="NumTotalCores" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 9545)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 9546)
@@ -5929,5 +5929,5 @@
 		private System.DateTime _Time;
 		
-		private System.Nullable<System.Guid> _UserId;
+		private System.Guid _UserId;
 		
 		private int _NumUsedCores;
@@ -5969,5 +5969,5 @@
     partial void OnTimeChanging(System.DateTime value);
     partial void OnTimeChanged();
-    partial void OnUserIdChanging(System.Nullable<System.Guid> value);
+    partial void OnUserIdChanging(System.Guid value);
     partial void OnUserIdChanged();
     partial void OnNumUsedCoresChanging(int value);
@@ -6053,6 +6053,6 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NULL")]
-		public System.Nullable<System.Guid> UserId
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NULL", IsPrimaryKey=true)]
+		public System.Guid UserId
 		{
 			get
@@ -6412,5 +6412,5 @@
 					else
 					{
-						this._UserId = default(Nullable<System.Guid>);
+						this._UserId = default(System.Guid);
 					}
 					this.SendPropertyChanged("DimUser");
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql	(revision 9545)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql	(revision 9546)
@@ -233,5 +233,5 @@
     [ClientId]              UNIQUEIDENTIFIER NOT NULL,
     [Time]                  DATETIME         NOT NULL,
-    [UserId]                UNIQUEIDENTIFIER NULL,
+    [UserId]                UNIQUEIDENTIFIER NOT NULL,
     [NumUsedCores]          INT              NOT NULL,
     [NumTotalCores]         INT              NOT NULL,
@@ -246,5 +246,5 @@
     [TotalTimeOffline]      FLOAT (53)       NOT NULL,
     [TotalTimeUnavailable]  FLOAT (53)       NOT NULL,
-    CONSTRAINT [PK_FactClientInfo] PRIMARY KEY CLUSTERED ([ClientId] ASC, [Time] ASC),
+    CONSTRAINT [PK_FactClientInfo] PRIMARY KEY CLUSTERED ([ClientId] ASC, [Time] ASC, [UserId] ASC),
     CONSTRAINT [FK_FactClientInfo_DimTime] FOREIGN KEY ([Time]) REFERENCES [statistics].[DimTime] ([Time]),
     CONSTRAINT [FK_FactClientInfo_DimClient] FOREIGN KEY ([ClientId]) REFERENCES [statistics].[DimClient] ([Id]),
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs	(revision 9545)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs	(revision 9546)
@@ -92,4 +92,9 @@
 
       db.DimUsers.InsertAllOnSubmit(newDimUsers);
+
+      // insert NULL-User
+      if (!db.DimUsers.Any(x => x.UserId == Guid.Empty)) {
+        db.DimUsers.InsertOnSubmit(new DimUser { UserId = Guid.Empty, Name = "NULL" });
+      }
     }
 
@@ -168,5 +173,5 @@
           DimClient = s.Client,
           DimTime = newTime,
-          UserId = s.Slave.OwnerUserId,
+          UserId = s.Slave.OwnerUserId ?? Guid.Empty,
           NumUsedCores =
             s.Slave.Cores != null && s.Slave.FreeCores != null
