Index: trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/AgentEntry.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/AgentEntry.cs	(revision 372)
+++ trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/AgentEntry.cs	(revision 375)
@@ -35,14 +35,7 @@
     public string Name { get; set; }
     [DataMember]
-    public AgentStatus Status { get; set; }
+    public ProcessStatus Status { get; set; }
     [DataMember]
     public byte[] RawData { get; set; }
-
-    public AgentEntry(long id, string name, AgentStatus status, byte[] rawData) {
-      Id = id;
-      Name = name;
-      Status = status;
-      RawData = rawData;
-    }
   }
 }
Index: trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/AgentStatus.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/AgentStatus.cs	(revision 372)
+++ 	(revision )
@@ -1,29 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace HeuristicLab.CEDMA.DB.Interfaces {
-  public enum AgentStatus { Unkown, Active, Finished, Error, Waiting}
-}
Index: trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/HeuristicLab.CEDMA.DB.Interfaces.csproj
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/HeuristicLab.CEDMA.DB.Interfaces.csproj	(revision 372)
+++ trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/HeuristicLab.CEDMA.DB.Interfaces.csproj	(revision 375)
@@ -59,5 +59,6 @@
   <ItemGroup>
     <Compile Include="AgentEntry.cs" />
-    <Compile Include="AgentStatus.cs" />
+    <Compile Include="ProcessStatus.cs" />
+    <Compile Include="RunEntry.cs" />
     <Compile Include="ResultEntry.cs" />
     <Compile Include="HeuristicLabCedmaDbInterfacesPlugin.cs" />
Index: trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/IDatabase.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/IDatabase.cs	(revision 372)
+++ trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/IDatabase.cs	(revision 375)
@@ -31,14 +31,47 @@
   public interface IDatabase {
     [OperationContract]
-    ICollection<AgentEntry> GetAgentEntries();
+    long InsertAgent(string name, byte[] rawData);
+
+    [OperationContract(Name = "UpdateAgentName")]
+    void UpdateAgent(long id, string name);
+
+    [OperationContract(Name = "UpdateAgentStatus")]
+    void UpdateAgent(long id, ProcessStatus status);
+
+    [OperationContract(Name = "UpdateAgentData")]
+    void UpdateAgent(long id, byte[] rawData);
 
     [OperationContract]
-    long CreateAgent();
+    long InsertRun(long agentId, byte[] rawData);
 
-    [OperationContract(Name="UpdateAgent")]
-    void Update(AgentEntry entry);
+    [OperationContract]
+    void UpdateRunStart(long runId, DateTime CreationTime);
 
-    [OperationContract(Name ="UpdateResult")]
-    void Update(ResultEntry result);
+    [OperationContract]
+    void UpdateRunFinished(long runId, DateTime CreationTime);
+
+    [OperationContract]
+    void UpdateRunStatus(long runId, ProcessStatus status);
+
+    [OperationContract]
+    long InsertResult(long runId, byte[] rawData);
+
+    [OperationContract]
+    long InsertSubResult(long resultId, byte[] rawData);
+
+
+    // should be replaced by more powerful querying interface (LINQ provider?)
+    [OperationContract]
+    ICollection<AgentEntry> GetAgents();
+
+    [OperationContract]
+    ICollection<RunEntry> GetRuns();
+
+    [OperationContract]
+    ICollection<ResultEntry> GetResults(long runId);
+
+    [OperationContract]
+    ICollection<ResultEntry> GetSubResults(long resultId);
+
   }
 }
Index: trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/ProcessStatus.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/ProcessStatus.cs	(revision 375)
+++ trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/ProcessStatus.cs	(revision 375)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.CEDMA.DB.Interfaces {
+  public enum ProcessStatus { Unkown, Active, Finished, Error, Waiting}
+}
Index: trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/ResultEntry.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/ResultEntry.cs	(revision 372)
+++ trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/ResultEntry.cs	(revision 375)
@@ -31,20 +31,13 @@
   public class ResultEntry {
     [DataMember]
-    private long id;
+    public long Id { get; set; }
     [DataMember]
-    private byte[] rawData;
-
-    public ResultEntry(long id, byte[] rawData) {
-      this.id = id;
-      this.rawData = rawData;
-    }
-
-    public long Id {
-      get { return id; }
-    }
-
-    public byte[] RawData {
-      get { return rawData; }
-    }
+    public long RunId { get; set; }
+    [DataMember]
+    public long ResultId { get; set; }
+    [DataMember]
+    public DateTime CreationTime { get; set; }
+    [DataMember]
+    public byte[] RawData { get; set; }
   }
 }
Index: trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/RunEntry.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/RunEntry.cs	(revision 375)
+++ trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/RunEntry.cs	(revision 375)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.CEDMA.DB.Interfaces;
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.CEDMA.DB.Interfaces {
+  [DataContract]
+  public class RunEntry {
+    [DataMember]
+    public long Id { get; set; }
+    [DataMember]
+    public long AgentId { get; set; }
+    [DataMember]
+    public DateTime CreationTime { get; set; }
+    [DataMember]
+    public DateTime? StartTime { get; set; }
+    [DataMember]
+    public DateTime? FinishedTime { get; set; }
+    [DataMember]
+    public ProcessStatus Status { get; set; }
+    [DataMember]
+    public byte[] RawData { get; set; }
+  }
+}
