Index: /trunk/sources/HeuristicLab.CEDMA.Charting/3.3/BubbleChart.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/3.3/BubbleChart.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/3.3/BubbleChart.cs	(revision 2223)
@@ -326,6 +326,5 @@
         ResultsEntry entry = GetResultsEntry(point);
         if (entry != null) {
-          string serializedData = (string)entry.Get(Ontology.SerializedData.Uri.Replace(Ontology.CedmaNameSpace, ""));
-          var model = (IItem)PersistenceManager.RestoreFromGZip(Convert.FromBase64String(serializedData));
+          var model = (IItem)PersistenceManager.RestoreFromGZip((byte[])entry.Get("PersistedData"));
           PluginManager.ControlManager.ShowControl(model.CreateView());
         }
Index: /trunk/sources/HeuristicLab.CEDMA.Core/3.3/Console.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Core/3.3/Console.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Core/3.3/Console.cs	(revision 2223)
@@ -28,21 +28,21 @@
 using System.ServiceModel;
 using System.ServiceModel.Description;
-using HeuristicLab.CEDMA.DB.Interfaces;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Modeling.Database.SQLServerCompact;
 
 namespace HeuristicLab.CEDMA.Core {
   public class Console : ItemBase, IEditable {
-    private string serverUri;
-    public string ServerUri {
-      get { return serverUri; }
+    private static readonly string sqlServerCompactFile = AppDomain.CurrentDomain.BaseDirectory + "HeuristicLab.Modeling.database.sdf";
+    private static readonly string sqlServerCompactConnectionString = @"Data Source=" + sqlServerCompactFile;
+
+    private Results results;
+    public Results Results {
+      get {
+        if (results == null) ReloadResults();
+        return results;
+      }
     }
-
-    private DataSet dataSet;
-    public DataSet DataSet {
-      get { return dataSet; }
-    }
-
     public Console()
       : base() {
-      dataSet = new DataSet();
     }
 
@@ -55,27 +55,6 @@
     }
 
-    #region serialization
-    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
-      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
-      XmlAttribute uriAttribute = document.CreateAttribute("ServerURI");
-      uriAttribute.Value = serverUri;
-      node.Attributes.Append(uriAttribute);
-      return node;
-    }
-
-    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
-      base.Populate(node, restoredObjects);
-      serverUri = node.Attributes["ServerURI"].Value;
-    }
-    #endregion
-
-    internal void Connect(string serverUri) {
-      IStore store = new StoreProxy(serverUri);
-      var variableBindings = store.Query("?Dataset <" + Ontology.InstanceOf + "> <" + Ontology.TypeDataSet + "> .", 0, 10).ToArray();
-      if (variableBindings.Length > 0) {
-        dataSet = new DataSet(store, (Entity)variableBindings[0].Get("Dataset"));
-      } else {
-        dataSet.Store = store;
-      }
+    private void ReloadResults() {
+      results = new Results(new DatabaseService(sqlServerCompactConnectionString));
     }
   }
Index: /trunk/sources/HeuristicLab.CEDMA.Core/3.3/ConsoleEditor.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Core/3.3/ConsoleEditor.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Core/3.3/ConsoleEditor.cs	(revision 2223)
@@ -29,12 +29,9 @@
 using HeuristicLab.PluginInfrastructure;
 using System.Drawing;
-using HeuristicLab.CEDMA.DB.Interfaces;
 
 namespace HeuristicLab.CEDMA.Core {
   class ConsoleEditor : EditorBase {
-    private System.Windows.Forms.TextBox uriTextBox;
-    private System.Windows.Forms.Label uriLabel;
-    private Button connectButton;
-    private Panel serverPanel;
+    private ComboBox viewComboBox;
+    private Button resultsButton;
     private Console console;
 
@@ -42,61 +39,41 @@
       InitializeComponent();
       this.console = console;
+      PopulateViewComboBox();
     }
 
     #region autogenerated code
     private void InitializeComponent() {
-      this.uriTextBox = new System.Windows.Forms.TextBox();
-      this.uriLabel = new System.Windows.Forms.Label();
-      this.connectButton = new System.Windows.Forms.Button();
-      this.serverPanel = new System.Windows.Forms.Panel();
+      this.viewComboBox = new System.Windows.Forms.ComboBox();
+      this.resultsButton = new System.Windows.Forms.Button();
       this.SuspendLayout();
       // 
-      // uriTextBox
+      // viewComboBox
       // 
-      this.uriTextBox.Location = new System.Drawing.Point(94, 3);
-      this.uriTextBox.Name = "uriTextBox";
-      this.uriTextBox.Size = new System.Drawing.Size(205, 20);
-      this.uriTextBox.TabIndex = 0;
+      this.viewComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.viewComboBox.FormattingEnabled = true;
+      this.viewComboBox.Location = new System.Drawing.Point(3, 3);
+      this.viewComboBox.Name = "viewComboBox";
+      this.viewComboBox.Size = new System.Drawing.Size(121, 21);
+      this.viewComboBox.TabIndex = 7;
       // 
-      // uriLabel
+      // resultsButton
       // 
-      this.uriLabel.AutoSize = true;
-      this.uriLabel.Location = new System.Drawing.Point(6, 6);
-      this.uriLabel.Name = "uriLabel";
-      this.uriLabel.Size = new System.Drawing.Size(82, 13);
-      this.uriLabel.TabIndex = 1;
-      this.uriLabel.Text = "CEDMA Server:";
-      // 
-      // connectButton
-      // 
-      this.connectButton.Location = new System.Drawing.Point(305, 1);
-      this.connectButton.Name = "connectButton";
-      this.connectButton.Size = new System.Drawing.Size(75, 23);
-      this.connectButton.TabIndex = 3;
-      this.connectButton.Text = "&Connect";
-      this.connectButton.UseVisualStyleBackColor = true;
-      this.connectButton.Click += new System.EventHandler(this.connectButton_Click);
-      // 
-      // serverPanel
-      // 
-      this.serverPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.serverPanel.Location = new System.Drawing.Point(3, 29);
-      this.serverPanel.Name = "serverPanel";
-      this.serverPanel.Size = new System.Drawing.Size(439, 157);
-      this.serverPanel.TabIndex = 4;
+      this.resultsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.resultsButton.Location = new System.Drawing.Point(130, 1);
+      this.resultsButton.Name = "resultsButton";
+      this.resultsButton.Size = new System.Drawing.Size(86, 23);
+      this.resultsButton.TabIndex = 6;
+      this.resultsButton.Text = "Show results";
+      this.resultsButton.UseVisualStyleBackColor = true;
+      this.resultsButton.Click += new System.EventHandler(this.resultsButton_Click);
       // 
       // ConsoleEditor
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.Controls.Add(this.serverPanel);
-      this.Controls.Add(this.connectButton);
-      this.Controls.Add(this.uriLabel);
-      this.Controls.Add(this.uriTextBox);
+      this.Controls.Add(this.viewComboBox);
+      this.Controls.Add(this.resultsButton);
       this.Name = "ConsoleEditor";
       this.Size = new System.Drawing.Size(445, 189);
       this.ResumeLayout(false);
-      this.PerformLayout();
 
     }
@@ -104,16 +81,16 @@
     #endregion
 
-    private void connectButton_Click(object sender, EventArgs e) {
-      try {
-        console.Connect(uriTextBox.Text);
-        connectButton.Enabled = false;
-        serverPanel.Enabled = true;
-        serverPanel.Controls.Clear();
-        Control dataSetView = (Control)console.DataSet.CreateView();
-        dataSetView.Dock = DockStyle.Fill;
-        serverPanel.Controls.Add(dataSetView);
-      } catch(CommunicationException ex) {
-        MessageBox.Show("Exception while trying to connect to " + uriTextBox.Text + "\n" + ex.Message);
-      }
+    private void PopulateViewComboBox() {
+      DiscoveryService service = new DiscoveryService();
+      IResultsViewFactory[] factories = service.GetInstances<IResultsViewFactory>();
+      viewComboBox.DataSource = factories;
+      viewComboBox.ValueMember = "Name";
+    }
+
+
+    private void resultsButton_Click(object sender, EventArgs e) {
+      IResultsViewFactory factory = (IResultsViewFactory)viewComboBox.SelectedItem;
+      IControl control = factory.CreateView(console.Results);
+      PluginManager.ControlManager.ShowControl(control);
     }
   }
Index: /trunk/sources/HeuristicLab.CEDMA.Core/3.3/HeuristicLab.CEDMA.Core-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Core/3.3/HeuristicLab.CEDMA.Core-3.3.csproj	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Core/3.3/HeuristicLab.CEDMA.Core-3.3.csproj	(revision 2223)
@@ -88,5 +88,4 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="StoreProxy.cs" />
     <Compile Include="IResultsViewFactory.cs" />
     <Compile Include="ResultsEntry.cs" />
@@ -101,19 +100,5 @@
       <SubType>UserControl</SubType>
     </Compile>
-    <Compile Include="Problem.cs" />
-    <Compile Include="DataSet.cs" />
-    <Compile Include="DataSetView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="DataSetView.Designer.cs">
-      <DependentUpon>DataSetView.cs</DependentUpon>
-    </Compile>
     <Compile Include="HeuristicLabCedmaCorePlugin.cs" />
-    <Compile Include="ProblemView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="ProblemView.Designer.cs">
-      <DependentUpon>ProblemView.cs</DependentUpon>
-    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Results.cs" />
@@ -123,8 +108,4 @@
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.CEDMA.DB.Interfaces\3.3\HeuristicLab.CEDMA.DB.Interfaces-3.3.csproj">
-      <Project>{4F9BB789-D561-436B-B226-2BF44B7D0804}</Project>
-      <Name>HeuristicLab.CEDMA.DB.Interfaces-3.3</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
       <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
@@ -138,4 +119,12 @@
       <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
       <Name>HeuristicLab.Data-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Modeling.Database.SQLServerCompact\3.2\HeuristicLab.Modeling.Database.SQLServerCompact-3.2.csproj">
+      <Project>{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}</Project>
+      <Name>HeuristicLab.Modeling.Database.SQLServerCompact-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Modeling.Database\3.2\HeuristicLab.Modeling.Database-3.2.csproj">
+      <Project>{E84E5717-79F8-498F-A5E0-A055C4EC086B}</Project>
+      <Name>HeuristicLab.Modeling.Database-3.2</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Operators\3.2\HeuristicLab.Operators-3.2.csproj">
@@ -155,10 +144,4 @@
       <DependentUpon>ConsoleEditor.cs</DependentUpon>
       <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="DataSetView.resx">
-      <DependentUpon>DataSetView.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="ProblemView.resx">
-      <DependentUpon>ProblemView.cs</DependentUpon>
     </EmbeddedResource>
   </ItemGroup>
Index: /trunk/sources/HeuristicLab.CEDMA.Core/3.3/HeuristicLabCedmaCorePlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Core/3.3/HeuristicLabCedmaCorePlugin.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Core/3.3/HeuristicLabCedmaCorePlugin.cs	(revision 2223)
@@ -31,6 +31,7 @@
   [Dependency(Dependency = "HeuristicLab.Data-3.2")]
   [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
-  [Dependency(Dependency = "HeuristicLab.CEDMA.DB.Interfaces-3.3")]
   [Dependency(Dependency = "HeuristicLab.Operators-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Modeling.Database-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Modeling.Database.SQLServerCompact-3.2")]
   public class HeuristicLabCedmaCorePlugin : PluginBase {
   }
Index: /trunk/sources/HeuristicLab.CEDMA.Core/3.3/IResultsViewFactory.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Core/3.3/IResultsViewFactory.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Core/3.3/IResultsViewFactory.cs	(revision 2223)
@@ -26,5 +26,4 @@
 using HeuristicLab.Core;
 using System.Xml;
-using HeuristicLab.CEDMA.DB.Interfaces;
 using HeuristicLab.Operators;
 using System.Windows.Forms;
Index: /trunk/sources/HeuristicLab.CEDMA.Core/3.3/Results.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Core/3.3/Results.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Core/3.3/Results.cs	(revision 2223)
@@ -26,5 +26,4 @@
 using HeuristicLab.Core;
 using System.Collections;
-using HeuristicLab.CEDMA.DB.Interfaces;
 using System.Xml;
 using System.Runtime.Serialization;
@@ -34,8 +33,8 @@
 using HeuristicLab.DataAnalysis;
 using System.Drawing;
+using HeuristicLab.Modeling.Database;
 
 namespace HeuristicLab.CEDMA.Core {
   public class Results : ItemBase {
-    private const int PAGE_SIZE = 1000;
     private string[] categoricalVariables = null;
     public string[] CategoricalVariables {
@@ -58,5 +57,5 @@
     }
 
-    private string[] multiDimensionalOrdinalVariables = new string[] { "VariableImpacts: EvaluationImpact", "VariableImpacts: QualityImpact" };
+    private string[] multiDimensionalOrdinalVariables;
     public string[] MultiDimensionalOrdinalVariables {
       get { return multiDimensionalOrdinalVariables; }
@@ -68,16 +67,11 @@
     }
 
-    private IStore store;
-    public IStore Store {
-      get { return store; }
-      set {
-        store = value;
-      }
-    }
+    private IModelingDatabase database;
 
     private Dictionary<string, Dictionary<object, double>> categoricalValueIndices = new Dictionary<string, Dictionary<object, double>>();
 
-    public Results(IStore store) {
-      this.store = store;
+    public Results(IModelingDatabase database) {
+      this.database = database;
+      multiDimensionalOrdinalVariables = database.GetAllResultsForInputVariables().Select(x => "VariableImpacts: " + x.Name).ToArray();
     }
 
@@ -91,101 +85,30 @@
 
     private IEnumerable<ResultsEntry> SelectRows() {
-      int page = 0;
-      int resultsReturned = 0;
+      database.Connect();      
       entries = new List<ResultsEntry>();
-      if (store == null) return entries;
-      do {
-        var allModels = store.Query(
-          "?Model <" + Ontology.InstanceOf + "> <" + Ontology.TypeModel + "> ." +
-          "?Model <" + Ontology.TargetVariable + "> ?TargetVariable ." +
-          "?Model <" + Ontology.TestMeanSquaredError + "> ?TestMSE .",
-          0, 3000)
-          .Select(modelBinding => new {
-            Model = ((Entity)modelBinding.Get("Model")).Uri,
-            TestMSE = (double)((Literal)modelBinding.Get("TestMSE")).Value,
-            TargetVariable = (string)((Literal)modelBinding.Get("TargetVariable")).Value
-          })
-          .Distinct()
-          .GroupBy(m => m.TargetVariable)
-          .Select(grouping => grouping.OrderBy(m => m.TestMSE));
-        foreach (var targetVariableBindings in allModels) {
-          resultsReturned = targetVariableBindings.Count();
-          int nModels = Math.Max(10, resultsReturned * 10 / 100);
-          nModels = Math.Min(nModels, resultsReturned);
-          foreach (var modelBindings in targetVariableBindings.Take(nModels)) {
-            ResultsEntry entry = new ResultsEntry();
-            entry.Uri = modelBindings.Model;
-            entries.Add(entry);
-            SetModelAttributes(entry, modelBindings.Model);
-            entry.Set("VariableImpacts", SelectVariableImpacts(modelBindings.Model));
+      foreach (var model in database.GetAllModels()) {
+        ResultsEntry modelEntry = new ResultsEntry();
+        foreach (var modelResult in database.GetModelResults(model)) {
+          modelEntry.Set(modelResult.Result.Name, modelResult.Value);
+        }
+        modelEntry.Set("PersistedData", database.GetModelData(model));
+        modelEntry.Set("TargetVariable", model.TargetVariable.Name);
+        Dictionary<HeuristicLab.Modeling.Database.IVariable, ResultsEntry> inputVariableResultsEntries =
+          new Dictionary<HeuristicLab.Modeling.Database.IVariable, ResultsEntry>();
+
+        foreach (IInputVariableResult inputVariableResult in database.GetInputVariableResults(model)) {
+          if (!inputVariableResultsEntries.ContainsKey(inputVariableResult.Variable)) {
+            inputVariableResultsEntries[inputVariableResult.Variable] = new ResultsEntry();
+            inputVariableResultsEntries[inputVariableResult.Variable].Set("InputVariableName", inputVariableResult.Variable.Name);
           }
+          inputVariableResultsEntries[inputVariableResult.Variable].Set(inputVariableResult.Result.Name, inputVariableResult.Value);
         }
-        page++;
-      } while (resultsReturned == PAGE_SIZE);
+        modelEntry.Set("VariableImpacts", inputVariableResultsEntries.Values);
+        entries.Add(modelEntry);
+      }
+      database.Disconnect();
       FireChanged();
       cached = true;
       return entries;
-    }
-
-    private void SetModelAttributes(ResultsEntry entry, string modelUri) {
-      var modelBindings = store.Query(
-        "<" + modelUri + "> ?Attribute ?Value .",
-        0, PAGE_SIZE);
-      foreach (var binding in modelBindings) {
-        if (binding.Get("Value") is Literal) {
-          string name = ((Entity)binding.Get("Attribute")).Uri.Replace(Ontology.CedmaNameSpace, "");
-          if (entry.Get(name) == null) {
-            object value = ((Literal)binding.Get("Value")).Value;
-            entry.Set(name, value);
-          }
-        }
-      }
-    }
-
-    private IEnumerable<ResultsEntry> SelectVariableImpacts(string modelUri) {
-      var inputVariableNameBindings = store.Query(
-          "<" + modelUri + "> <" + Ontology.HasInputVariable + "> ?InputVariable ." +
-          "?InputVariable <" + Ontology.Name + "> ?InputName .",
-          0, PAGE_SIZE);
-
-      var qualityImpactBindings = store.Query(
-          "<" + modelUri + "> <" + Ontology.HasInputVariable + "> ?InputVariable ." +
-          "?InputVariable <" + Ontology.QualityImpact + "> ?QualityImpact .",
-          0, PAGE_SIZE);
-
-      var evaluationImpactBindings = store.Query(
-           "<" + modelUri + "> <" + Ontology.HasInputVariable + "> ?InputVariable ." +
-           "?InputVariable <" + Ontology.EvaluationImpact + "> ?EvaluationImpact .",
-           0, PAGE_SIZE);
-      Dictionary<object, ResultsEntry> inputVariableAttributes = new Dictionary<object, ResultsEntry>();
-
-      foreach (var inputVariableNameBinding in inputVariableNameBindings) {
-        object inputVariable = inputVariableNameBinding.Get("InputVariable");
-        object name = ((Literal)inputVariableNameBinding.Get("InputName")).Value;
-        if (!inputVariableAttributes.ContainsKey(inputVariable)) {
-          inputVariableAttributes[inputVariable] = new ResultsEntry();
-          inputVariableAttributes[inputVariable].Set("InputVariableName", name);
-        }
-      }
-
-      foreach (var qualityImpactBinding in qualityImpactBindings) {
-        double qualityImpact = (double)((Literal)qualityImpactBinding.Get("QualityImpact")).Value;
-        object inputVariable = qualityImpactBinding.Get("InputVariable");
-        if (!IsAlmost(qualityImpact, 1.0)) {
-          if (inputVariableAttributes[inputVariable].Get("QualityImpact") == null)
-            inputVariableAttributes[inputVariable].Set("QualityImpact", qualityImpact);
-        } else inputVariableAttributes.Remove(inputVariable);
-      }
-
-      foreach (var evaluationImpactBinding in evaluationImpactBindings) {
-        double evaluationImpact = (double)((Literal)evaluationImpactBinding.Get("EvaluationImpact")).Value;
-        object inputVariable = evaluationImpactBinding.Get("InputVariable");
-        if (!IsAlmost(evaluationImpact, 0.0)) {
-          if (inputVariableAttributes.ContainsKey(inputVariable) && inputVariableAttributes[inputVariable].Get("EvaluationImpact") == null)
-            inputVariableAttributes[inputVariable].Set("EvaluationImpact", evaluationImpact);
-        } else inputVariableAttributes.Remove(inputVariable);
-      }
-
-      return inputVariableAttributes.Values;
     }
 
@@ -199,20 +122,6 @@
 
     private void LoadModelAttributes() {
-      this.ordinalVariables =
-        store
-          .Query(
-            "?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeModelAttribute + "> ." + Environment.NewLine +
-            "?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeOrdinalAttribute + "> .", 0, 100)
-          .Select(s => ((Entity)s.Get("ModelAttribute")).Uri.Replace(Ontology.CedmaNameSpace, ""))
-          .Distinct()
-          .ToArray();
-      this.categoricalVariables =
-        store
-          .Query(
-            "?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeModelAttribute + "> ." + Environment.NewLine +
-            "?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeCategoricalAttribute + "> .", 0, 100)
-          .Select(s => ((Entity)s.Get("ModelAttribute")).Uri.Replace(Ontology.CedmaNameSpace, ""))
-          .Distinct()
-          .ToArray();
+      ordinalVariables = database.GetAllResults().Select(r => r.Name).ToArray();
+      categoricalVariables = new string[] { "TargetVariable" };
     }
 
Index: /trunk/sources/HeuristicLab.CEDMA.Core/3.3/ResultsEntry.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Core/3.3/ResultsEntry.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Core/3.3/ResultsEntry.cs	(revision 2223)
@@ -26,5 +26,4 @@
 using HeuristicLab.Core;
 using System.Collections;
-using HeuristicLab.CEDMA.DB.Interfaces;
 using System.Xml;
 using System.Runtime.Serialization;
Index: /trunk/sources/HeuristicLab.CEDMA.Core/3.3/TableResultsView.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Core/3.3/TableResultsView.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Core/3.3/TableResultsView.cs	(revision 2223)
@@ -10,5 +10,4 @@
 using HeuristicLab.CEDMA.Core;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.CEDMA.DB.Interfaces;
 
 namespace HeuristicLab.CEDMA.Core {
@@ -69,7 +68,6 @@
       if (e.Button == MouseButtons.Left && e.Clicks == 2) {
         DataGridView.HitTestInfo hitInfo = dataGridView.HitTest(e.X, e.Y);
-        ResultsEntry entry = (ResultsEntry)dataGridView.Rows[hitInfo.RowIndex].Tag;
-        string serializedData =  (string)entry.Get(Ontology.SerializedData.Uri.Replace(Ontology.CedmaNameSpace, ""));
-        var model = (IItem)PersistenceManager.RestoreFromGZip(Convert.FromBase64String(serializedData));
+        ResultsEntry entry = (ResultsEntry)dataGridView.Rows[hitInfo.RowIndex].Tag;        
+        var model = (IItem)PersistenceManager.RestoreFromGZip((byte[])entry.Get("PersistedData"));
         PluginManager.ControlManager.ShowControl(model.CreateView());
       }
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 2223)
@@ -27,6 +27,4 @@
 using System.Net;
 using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
 using System.ServiceModel.Description;
 using System.Linq;
@@ -35,12 +33,12 @@
 using HeuristicLab.Core;
 using HeuristicLab.Modeling;
+using HeuristicLab.Modeling.Database;
 
 namespace HeuristicLab.CEDMA.Server {
   public abstract class DispatcherBase : IDispatcher {
-    private IStore store;
-    private DataSet dataset;
+    private IModelingDatabase database;
     private List<int> allowedTargetVariables;
     private Dictionary<int, List<int>> activeInputVariables;
-
+    private Problem problem;
     internal event EventHandler Changed;
     private object locker = new object();
@@ -48,6 +46,6 @@
     public IEnumerable<string> TargetVariables {
       get {
-        if (dataset != null) {
-          return dataset.Problem.AllowedTargetVariables.Select(x => dataset.Problem.Dataset.GetVariableName(x));
+        if (problem != null) {
+          return Enumerable.Range(0, problem.Dataset.Columns).Select(x => problem.Dataset.GetVariableName(x));
         } else return new string[0];
       }
@@ -56,28 +54,25 @@
     public IEnumerable<string> InputVariables {
       get {
-        if (dataset != null) {
-          return dataset.Problem.AllowedInputVariables.Select(x => dataset.Problem.Dataset.GetVariableName(x));
+        if (problem != null) {
+          return TargetVariables;
         } else return new string[0];
       }
     }
 
-    public DispatcherBase(IStore store) {
-      this.store = store;
+    public DispatcherBase(IModelingDatabase database, Problem problem) {
+      this.problem = problem;
       allowedTargetVariables = new List<int>();
       activeInputVariables = new Dictionary<int, List<int>>();
+      problem.Changed += (sender, args) => {
+        lock (locker) {
+          allowedTargetVariables.Clear();
+          activeInputVariables.Clear();
+        }
+        OnChanged();
+      };
+      this.database = database;
     }
 
-    public IAlgorithm GetNextJob() {
-      if (dataset == null) {
-        var datasetEntities = store.Query("?DataSet <" + Ontology.InstanceOf.Uri + "> <" + Ontology.TypeDataSet.Uri + "> .", 0, 1)
-          .Select(x => (Entity)x.Get("DataSet"));
-        if (datasetEntities.Count() == 0) return null;
-        dataset = new DataSet(store, datasetEntities.ElementAt(0));
-        foreach (int targetVar in dataset.Problem.AllowedTargetVariables) {
-          activeInputVariables.Add(targetVar, new List<int>());
-          activeInputVariables[targetVar].AddRange(dataset.Problem.AllowedInputVariables);
-        }
-        OnChanged();
-      }
+    public HeuristicLab.Modeling.IAlgorithm GetNextJob() {
       if (allowedTargetVariables.Count > 0) {
         int[] targetVariables, inputVariables;
@@ -92,5 +87,5 @@
         }
 
-        IAlgorithm selectedAlgorithm = SelectAndConfigureAlgorithm(targetVariable, inputVariables, dataset.Problem);
+        HeuristicLab.Modeling.IAlgorithm selectedAlgorithm = SelectAndConfigureAlgorithm(targetVariable, inputVariables, problem);
 
         return selectedAlgorithm;
@@ -102,5 +97,5 @@
       return targetVariables[rand.Next(targetVariables.Length)];
     }
-    public abstract IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem);
+    public abstract HeuristicLab.Modeling.IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem);
 
     #region IViewable Members
@@ -114,16 +109,17 @@
     internal void EnableTargetVariable(string name) {
       lock (locker)
-        allowedTargetVariables.Add(dataset.Problem.Dataset.GetVariableIndex(name));
+        allowedTargetVariables.Add(problem.Dataset.GetVariableIndex(name));
     }
 
     internal void DisableTargetVariable(string name) {
       lock (locker)
-        allowedTargetVariables.Remove(dataset.Problem.Dataset.GetVariableIndex(name));
+        allowedTargetVariables.Remove(problem.Dataset.GetVariableIndex(name));
     }
 
     internal void EnableInputVariable(string target, string name) {
       lock (locker) {
-        int targetIndex = dataset.Problem.Dataset.GetVariableIndex(target);
-        int inputIndex = dataset.Problem.Dataset.GetVariableIndex(name);
+        int targetIndex = problem.Dataset.GetVariableIndex(target);
+        int inputIndex = problem.Dataset.GetVariableIndex(name);
+        if (!activeInputVariables.ContainsKey(targetIndex)) activeInputVariables[targetIndex] = new List<int>();
         if (!activeInputVariables[targetIndex].Contains(inputIndex)) {
           activeInputVariables[targetIndex].Add(inputIndex);
@@ -134,6 +130,7 @@
     internal void DisableInputVariable(string target, string name) {
       lock (locker) {
-        int targetIndex = dataset.Problem.Dataset.GetVariableIndex(target);
-        int inputIndex = dataset.Problem.Dataset.GetVariableIndex(name);
+        int targetIndex = problem.Dataset.GetVariableIndex(target);
+        int inputIndex = problem.Dataset.GetVariableIndex(name);
+        if (!activeInputVariables.ContainsKey(targetIndex)) activeInputVariables[targetIndex] = new List<int>();
         while (activeInputVariables[targetIndex].Remove(inputIndex)) { }
       }
@@ -145,6 +142,8 @@
 
     internal IEnumerable<string> GetInputVariables(string target) {
-      return activeInputVariables[dataset.Problem.Dataset.GetVariableIndex(target)]
-        .Select(i => dataset.Problem.Dataset.GetVariableName(i));
+      int targetIndex = problem.Dataset.GetVariableIndex(target);
+      if (!activeInputVariables.ContainsKey(targetIndex)) activeInputVariables[targetIndex] = new List<int>();
+      return activeInputVariables[targetIndex]
+        .Select(i => problem.Dataset.GetVariableName(i));
     }
   }
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs	(revision 2223)
@@ -12,9 +12,11 @@
   public partial class DispatcherView : ViewBase {
     private DispatcherBase dispatcher;
-    public DispatcherView(DispatcherBase dispatcher) : base() {
+    public DispatcherView(DispatcherBase dispatcher)
+      : base() {
       this.dispatcher = dispatcher;
       InitializeComponent();
       UpdateControls();
       dispatcher.Changed += (sender, args) => UpdateControls();
+      this.inputVariableList.CheckOnClick = true;
     }
 
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs	(revision 2223)
@@ -27,6 +27,4 @@
 using System.Net;
 using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
 using System.ServiceModel.Description;
 using System.Linq;
@@ -38,4 +36,5 @@
 using System.Threading;
 using HeuristicLab.Modeling;
+using HeuristicLab.Modeling.Database;
 
 namespace HeuristicLab.CEDMA.Server {
@@ -46,6 +45,6 @@
     protected IDispatcher Dispatcher {
       get { return dispatcher; }
-    }
-    private IStore store;
+    }    
+    private IModelingDatabase databaseService;
 
     private int maxActiveJobs;
@@ -59,8 +58,8 @@
     }
 
-    public ExecuterBase(IDispatcher dispatcher, IStore store) {
+    public ExecuterBase(IDispatcher dispatcher, IModelingDatabase databaseService) {
       maxActiveJobs = 10;
       this.dispatcher = dispatcher;
-      this.store = store;
+      this.databaseService = databaseService;
     }
 
@@ -72,5 +71,5 @@
 
     protected void SetResults(IScope src, IScope target) {
-      foreach (IVariable v in src.Variables) {
+      foreach (HeuristicLab.Core.IVariable v in src.Variables) {
         target.AddVariable(v);
       }
@@ -83,49 +82,50 @@
     }
 
-    protected void StoreResults(IAlgorithm finishedAlgorithm) {
-      Entity modelEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
-      IModel model = finishedAlgorithm.Model;
-      List<Statement> statements = new List<Statement>();
-      statements.Add(new Statement(modelEntity, Ontology.InstanceOf, Ontology.TypeModel));
-      statements.Add(new Statement(modelEntity, Ontology.TargetVariable, new Literal(model.TargetVariable)));
-      statements.Add(new Statement(modelEntity, Ontology.Name, new Literal(finishedAlgorithm.Name)));
+    protected void StoreResults(HeuristicLab.Modeling.IAlgorithm finishedAlgorithm) {
+      databaseService.Persist(finishedAlgorithm);
+      //Entity modelEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
+      //IModel model = finishedAlgorithm.Model;
+      //List<Statement> statements = new List<Statement>();
+      //statements.Add(new Statement(modelEntity, Ontology.InstanceOf, Ontology.TypeModel));
+      //statements.Add(new Statement(modelEntity, Ontology.TargetVariable, new Literal(model.TargetVariable)));
+      //statements.Add(new Statement(modelEntity, Ontology.Name, new Literal(finishedAlgorithm.Name)));
       
-      statements.Add(new Statement(modelEntity, Ontology.TrainingMeanSquaredError, new Literal(model.TrainingMeanSquaredError)));
-      statements.Add(new Statement(modelEntity, Ontology.ValidationMeanSquaredError, new Literal(model.ValidationMeanSquaredError)));
-      statements.Add(new Statement(modelEntity, Ontology.TestMeanSquaredError, new Literal(model.TestMeanSquaredError)));
-      statements.Add(new Statement(modelEntity, Ontology.TrainingCoefficientOfDetermination, new Literal(model.TrainingCoefficientOfDetermination)));
-      statements.Add(new Statement(modelEntity, Ontology.ValidationCoefficientOfDetermination, new Literal(model.ValidationCoefficientOfDetermination)));
-      statements.Add(new Statement(modelEntity, Ontology.TestCoefficientOfDetermination, new Literal(model.TestCoefficientOfDetermination)));
-      statements.Add(new Statement(modelEntity, Ontology.TrainingVarianceAccountedFor, new Literal(model.TrainingVarianceAccountedFor)));
-      statements.Add(new Statement(modelEntity, Ontology.ValidationVarianceAccountedFor, new Literal(model.ValidationVarianceAccountedFor)));
-      statements.Add(new Statement(modelEntity, Ontology.TestVarianceAccountedFor, new Literal(model.TestVarianceAccountedFor)));
-      statements.Add(new Statement(modelEntity, Ontology.TrainingMeanAbsolutePercentageError, new Literal(model.TrainingMeanAbsolutePercentageError)));
-      statements.Add(new Statement(modelEntity, Ontology.ValidationMeanAbsolutePercentageError, new Literal(model.ValidationMeanAbsolutePercentageError)));
-      statements.Add(new Statement(modelEntity, Ontology.TestMeanAbsolutePercentageError, new Literal(model.TestMeanAbsolutePercentageError)));
-      statements.Add(new Statement(modelEntity, Ontology.TrainingMeanAbsolutePercentageOfRangeError, new Literal(model.TrainingMeanAbsolutePercentageOfRangeError)));
-      statements.Add(new Statement(modelEntity, Ontology.ValidationMeanAbsolutePercentageOfRangeError, new Literal(model.ValidationMeanAbsolutePercentageOfRangeError)));
-      statements.Add(new Statement(modelEntity, Ontology.TestMeanAbsolutePercentageOfRangeError, new Literal(model.TestMeanAbsolutePercentageOfRangeError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TrainingMeanSquaredError, new Literal(model.TrainingMeanSquaredError)));
+      //statements.Add(new Statement(modelEntity, Ontology.ValidationMeanSquaredError, new Literal(model.ValidationMeanSquaredError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TestMeanSquaredError, new Literal(model.TestMeanSquaredError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TrainingCoefficientOfDetermination, new Literal(model.TrainingCoefficientOfDetermination)));
+      //statements.Add(new Statement(modelEntity, Ontology.ValidationCoefficientOfDetermination, new Literal(model.ValidationCoefficientOfDetermination)));
+      //statements.Add(new Statement(modelEntity, Ontology.TestCoefficientOfDetermination, new Literal(model.TestCoefficientOfDetermination)));
+      //statements.Add(new Statement(modelEntity, Ontology.TrainingVarianceAccountedFor, new Literal(model.TrainingVarianceAccountedFor)));
+      //statements.Add(new Statement(modelEntity, Ontology.ValidationVarianceAccountedFor, new Literal(model.ValidationVarianceAccountedFor)));
+      //statements.Add(new Statement(modelEntity, Ontology.TestVarianceAccountedFor, new Literal(model.TestVarianceAccountedFor)));
+      //statements.Add(new Statement(modelEntity, Ontology.TrainingMeanAbsolutePercentageError, new Literal(model.TrainingMeanAbsolutePercentageError)));
+      //statements.Add(new Statement(modelEntity, Ontology.ValidationMeanAbsolutePercentageError, new Literal(model.ValidationMeanAbsolutePercentageError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TestMeanAbsolutePercentageError, new Literal(model.TestMeanAbsolutePercentageError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TrainingMeanAbsolutePercentageOfRangeError, new Literal(model.TrainingMeanAbsolutePercentageOfRangeError)));
+      //statements.Add(new Statement(modelEntity, Ontology.ValidationMeanAbsolutePercentageOfRangeError, new Literal(model.ValidationMeanAbsolutePercentageOfRangeError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TestMeanAbsolutePercentageOfRangeError, new Literal(model.TestMeanAbsolutePercentageOfRangeError)));
 
-      for (int i = 0; i < finishedAlgorithm.Dataset.Columns; i++) {
-        try {
-          string variableName = finishedAlgorithm.Dataset.GetVariableName(i);
-          double qualImpact = model.GetVariableQualityImpact(variableName);
-          double evalImpact = model.GetVariableEvaluationImpact(variableName);
+      //for (int i = 0; i < finishedAlgorithm.Dataset.Columns; i++) {
+      //  try {
+      //    string variableName = finishedAlgorithm.Dataset.GetVariableName(i);
+      //    double qualImpact = model.GetVariableQualityImpact(variableName);
+      //    double evalImpact = model.GetVariableEvaluationImpact(variableName);
 
-          Entity inputVariableEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
-          statements.Add(new Statement(inputVariableEntity, Ontology.InstanceOf, Ontology.TypeVariableImpact));
-          statements.Add(new Statement(modelEntity, Ontology.HasInputVariable, inputVariableEntity));
-          statements.Add(new Statement(inputVariableEntity, Ontology.EvaluationImpact, new Literal(evalImpact)));
-          statements.Add(new Statement(inputVariableEntity, Ontology.QualityImpact, new Literal(qualImpact)));
-          statements.Add(new Statement(inputVariableEntity, Ontology.Name, new Literal(variableName)));
-        }
-        catch (ArgumentException) {
-          // ignore
-        }
-      }
+      //    Entity inputVariableEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
+      //    statements.Add(new Statement(inputVariableEntity, Ontology.InstanceOf, Ontology.TypeVariableImpact));
+      //    statements.Add(new Statement(modelEntity, Ontology.HasInputVariable, inputVariableEntity));
+      //    statements.Add(new Statement(inputVariableEntity, Ontology.EvaluationImpact, new Literal(evalImpact)));
+      //    statements.Add(new Statement(inputVariableEntity, Ontology.QualityImpact, new Literal(qualImpact)));
+      //    statements.Add(new Statement(inputVariableEntity, Ontology.Name, new Literal(variableName)));
+      //  }
+      //  catch (ArgumentException) {
+      //    // ignore
+      //  }
+      //}
 
-      byte[] serializedModel = PersistenceManager.SaveToGZip(model.Data);
-      statements.Add(new Statement(modelEntity, Ontology.SerializedData, new Literal(Convert.ToBase64String(serializedModel))));
-      store.AddRange(statements);
+      //byte[] serializedModel = PersistenceManager.SaveToGZip(model.Data);
+      //statements.Add(new Statement(modelEntity, Ontology.SerializedData, new Literal(Convert.ToBase64String(serializedModel))));
+      //store.AddRange(statements);
     }
 
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 2223)
@@ -27,6 +27,4 @@
 using System.Net;
 using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
 using System.ServiceModel.Description;
 using System.Linq;
@@ -38,9 +36,10 @@
 using System.Threading;
 using HeuristicLab.Modeling;
+using HeuristicLab.Modeling.Database;
 
 namespace HeuristicLab.CEDMA.Server {
   public class GridExecuter : ExecuterBase {
     private JobManager jobManager;
-    private Dictionary<AsyncGridResult, IAlgorithm> activeAlgorithms;
+    private Dictionary<AsyncGridResult, HeuristicLab.Modeling.IAlgorithm> activeAlgorithms;
 
     private TimeSpan StartJobInterval {
@@ -56,8 +55,8 @@
     }
 
-    public GridExecuter(IDispatcher dispatcher, IStore store, IGridServer server)
-      : base(dispatcher, store) {
+    public GridExecuter(IDispatcher dispatcher,  IGridServer server, IModelingDatabase databaseService)
+      : base(dispatcher, databaseService) {
       this.jobManager = new JobManager(server);
-      activeAlgorithms = new Dictionary<AsyncGridResult, IAlgorithm>();
+      activeAlgorithms = new Dictionary<AsyncGridResult, HeuristicLab.Modeling.IAlgorithm>();
       jobManager.Reset();
     }
@@ -71,5 +70,5 @@
             Thread.Sleep(StartJobInterval);
             // get an execution from the dispatcher and execute in grid via job-manager
-            IAlgorithm algorithm = Dispatcher.GetNextJob();
+            HeuristicLab.Modeling.IAlgorithm algorithm = Dispatcher.GetNextJob();
             if (algorithm != null) {
               AtomicOperation op = new AtomicOperation(algorithm.Engine.OperatorGraph.InitialOperator, algorithm.Engine.GlobalScope);
@@ -91,5 +90,5 @@
             if (readyHandleIndex != WaitHandle.WaitTimeout) {
               WaitHandle readyHandle = whArr[readyHandleIndex];
-              IAlgorithm finishedAlgorithm = null;
+              HeuristicLab.Modeling.IAlgorithm finishedAlgorithm = null;
               AsyncGridResult finishedResult = null;
               lock (activeAlgorithms) {
@@ -138,5 +137,5 @@
         string[] retVal = new string[activeAlgorithms.Count];
         int i = 0;
-        foreach (IAlgorithm a in activeAlgorithms.Values) {
+        foreach (HeuristicLab.Modeling.IAlgorithm a in activeAlgorithms.Values) {
           retVal[i++] = a.Name + " " + a.Dataset.GetVariableName(a.TargetVariable);
         }
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj	(revision 2223)
@@ -91,4 +91,12 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="LearningTask.cs" />
+    <Compile Include="Problem.cs" />
+    <Compile Include="ProblemView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="ProblemView.Designer.cs">
+      <DependentUpon>ProblemView.cs</DependentUpon>
+    </Compile>
     <Compile Include="ExecuterView.cs">
       <SubType>UserControl</SubType>
@@ -125,12 +133,4 @@
       <Name>HeuristicLab.CEDMA.Core-3.3</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.CEDMA.DB.Interfaces\3.3\HeuristicLab.CEDMA.DB.Interfaces-3.3.csproj">
-      <Project>{4F9BB789-D561-436B-B226-2BF44B7D0804}</Project>
-      <Name>HeuristicLab.CEDMA.DB.Interfaces-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.CEDMA.DB\3.3\HeuristicLab.CEDMA.DB-3.3.csproj">
-      <Project>{B3D6D8D9-2B1F-47EC-9C73-77FAECF87310}</Project>
-      <Name>HeuristicLab.CEDMA.DB-3.3</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
       <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
@@ -153,4 +153,12 @@
       <Name>HeuristicLab.Grid-3.2</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Modeling.Database.SQLServerCompact\3.2\HeuristicLab.Modeling.Database.SQLServerCompact-3.2.csproj">
+      <Project>{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}</Project>
+      <Name>HeuristicLab.Modeling.Database.SQLServerCompact-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Modeling.Database\3.2\HeuristicLab.Modeling.Database-3.2.csproj">
+      <Project>{E84E5717-79F8-498F-A5E0-A055C4EC086B}</Project>
+      <Name>HeuristicLab.Modeling.Database-3.2</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Modeling\3.2\HeuristicLab.Modeling-3.2.csproj">
       <Project>{80F7FADA-549D-4151-8856-79B620A50DBA}</Project>
@@ -171,4 +179,7 @@
   </ItemGroup>
   <ItemGroup>
+    <EmbeddedResource Include="ProblemView.resx">
+      <DependentUpon>ProblemView.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="DispatcherView.resx">
       <DependentUpon>DispatcherView.cs</DependentUpon>
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLabCedmaServerPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLabCedmaServerPlugin.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLabCedmaServerPlugin.cs	(revision 2223)
@@ -28,6 +28,4 @@
   [ClassInfo(Name = "HeuristicLab.CEDMA.Server-3.3")]
   [PluginFile(Filename = "HeuristicLab.CEDMA.Server-3.3.dll", Filetype = PluginFileType.Assembly)]
-  [Dependency(Dependency = "HeuristicLab.CEDMA.DB.Interfaces-3.3")]
-  [Dependency(Dependency = "HeuristicLab.CEDMA.DB-3.3")]
   [Dependency(Dependency = "HeuristicLab.Grid-3.2")]
   [Dependency(Dependency = "HeuristicLab.Grid.HiveBridge-3.2")]
@@ -36,4 +34,6 @@
   [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
   [Dependency(Dependency = "HeuristicLab.Modeling-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Modeling.Database-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Modeling.Database.SQLServerCompact-3.2")]
   [Dependency(Dependency = "HeuristicLab.Tracing-3.2")]
   public class HeuristicLabCedmaServerPlugin : PluginBase {
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/LearningTask.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/LearningTask.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/LearningTask.cs	(revision 2223)
@@ -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
+
+namespace HeuristicLab.CEDMA.Server {
+  public enum LearningTask {
+    Classification,
+    Regression,
+    TimeSeries,
+    Clustering
+  }
+}
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/Problem.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/Problem.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/Problem.cs	(revision 2223)
@@ -0,0 +1,141 @@
+﻿#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.Core;
+using System.Xml;
+using HeuristicLab.Operators;
+
+namespace HeuristicLab.CEDMA.Server {
+
+
+  /// <summary>
+  /// Problem describes the data mining task.
+  /// Contains the actual data and meta-data:
+  ///  * which variables should be modelled 
+  ///  * regression, time-series or classification problem
+  /// </summary>
+  public class Problem {
+    internal event EventHandler Changed;
+
+    private HeuristicLab.DataAnalysis.Dataset dataset;
+    public HeuristicLab.DataAnalysis.Dataset Dataset {
+      get { return dataset; }
+      set {
+        if (value != dataset) {
+          dataset = value;
+        }
+      }
+    }
+
+    private int trainingSamplesStart;
+    public int TrainingSamplesStart {
+      get { return trainingSamplesStart; }
+      set { trainingSamplesStart = value; }
+    }
+
+    private int trainingSamplesEnd;
+    public int TrainingSamplesEnd {
+      get { return trainingSamplesEnd; }
+      set { trainingSamplesEnd = value; }
+    }
+
+    private int validationSamplesStart;
+    public int ValidationSamplesStart {
+      get { return validationSamplesStart; }
+      set { validationSamplesStart = value; }
+    }
+
+    private int validationSamplesEnd;
+    public int ValidationSamplesEnd {
+      get { return validationSamplesEnd; }
+      set { validationSamplesEnd = value; }
+    }
+
+    private int testSamplesStart;
+    public int TestSamplesStart {
+      get { return testSamplesStart; }
+      set { testSamplesStart = value; }
+    }
+
+    private int testSamplesEnd;
+    public int TestSamplesEnd {
+      get { return testSamplesEnd; }
+      set { testSamplesEnd = value; }
+    }
+
+    //private List<int> allowedInputVariables;
+    //public List<int> AllowedInputVariables {
+    //  get { return allowedInputVariables; }
+    //}
+
+    //private List<int> allowedTargetVariables;
+    //public List<int> AllowedTargetVariables {
+    //  get { return allowedTargetVariables; }
+    //}
+
+    private bool autoRegressive;
+    public bool AutoRegressive {
+      get { return autoRegressive; }
+      set { autoRegressive = value; }
+    }
+
+    private int minTimeOffset;
+    public int MinTimeOffset {
+      get { return minTimeOffset; }
+      set { minTimeOffset = value; }
+    }
+
+    private int maxTimeOffset;
+    public int MaxTimeOffset {
+      get { return maxTimeOffset; }
+      set { maxTimeOffset = value; }
+    }
+
+    private LearningTask learningTask;
+    public LearningTask LearningTask {
+      get { return learningTask; }
+      set { learningTask = value; }
+    }
+
+    public Problem()
+      : base() {
+      //allowedInputVariables = new List<int>();
+      //allowedTargetVariables = new List<int>();
+      Dataset = new HeuristicLab.DataAnalysis.Dataset();
+    }
+
+    public string GetVariableName(int index) {
+      return dataset.GetVariableName(index);
+    }
+
+    public IView CreateView() {
+      return new ProblemView(this);
+    }
+
+    internal void FireChanged() {
+      if (Changed != null) Changed(this, new EventArgs());
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.Designer.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.Designer.cs	(revision 2223)
@@ -0,0 +1,359 @@
+﻿#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 HeuristicLab.Core;
+using System.Windows.Forms;
+namespace HeuristicLab.CEDMA.Server {
+  partial class ProblemView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if(disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.importButton = new System.Windows.Forms.Button();
+      this.trainingSamplesStartTextBox = new System.Windows.Forms.TextBox();
+      this.trainingLabel = new System.Windows.Forms.Label();
+      this.trainingSamplesEndTextBox = new System.Windows.Forms.TextBox();
+      this.validationSamplesEndTextBox = new System.Windows.Forms.TextBox();
+      this.validationSamplesStartTextBox = new System.Windows.Forms.TextBox();
+      this.validationLabel = new System.Windows.Forms.Label();
+      this.testSamplesEndTextBox = new System.Windows.Forms.TextBox();
+      this.testSamplesStartTextBox = new System.Windows.Forms.TextBox();
+      this.testLabel = new System.Windows.Forms.Label();
+      this.autoregressiveCheckBox = new System.Windows.Forms.CheckBox();
+      this.partitioningGroupBox = new System.Windows.Forms.GroupBox();
+      this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
+      this.classificationRadioButton = new System.Windows.Forms.RadioButton();
+      this.regressionRadioButton = new System.Windows.Forms.RadioButton();
+      this.timeSeriesRadioButton = new System.Windows.Forms.RadioButton();
+      this.minTimeOffsetLabel = new System.Windows.Forms.Label();
+      this.minTimeOffsetTextBox = new System.Windows.Forms.TextBox();
+      this.learningTaskGroupBox = new System.Windows.Forms.GroupBox();
+      this.autoregressiveLabel = new System.Windows.Forms.Label();
+      this.maxTimeOffsetLabel = new System.Windows.Forms.Label();
+      this.maxTimeOffsetTextBox = new System.Windows.Forms.TextBox();
+      this.datasetView1 = new HeuristicLab.DataAnalysis.DatasetView();
+      this.partitioningGroupBox.SuspendLayout();
+      this.learningTaskGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // importButton
+      // 
+      this.importButton.Location = new System.Drawing.Point(3, 3);
+      this.importButton.Name = "importButton";
+      this.importButton.Size = new System.Drawing.Size(75, 23);
+      this.importButton.TabIndex = 0;
+      this.importButton.Text = "Import";
+      this.importButton.UseVisualStyleBackColor = true;
+      this.importButton.Click += new System.EventHandler(this.importButton_Click);
+      // 
+      // trainingSamplesStartTextBox
+      // 
+      this.trainingSamplesStartTextBox.Location = new System.Drawing.Point(119, 17);
+      this.trainingSamplesStartTextBox.Name = "trainingSamplesStartTextBox";
+      this.trainingSamplesStartTextBox.Size = new System.Drawing.Size(96, 20);
+      this.trainingSamplesStartTextBox.TabIndex = 4;
+      this.trainingSamplesStartTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.trainingSamplesStartTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // trainingLabel
+      // 
+      this.trainingLabel.AutoSize = true;
+      this.trainingLabel.Location = new System.Drawing.Point(13, 20);
+      this.trainingLabel.Name = "trainingLabel";
+      this.trainingLabel.Size = new System.Drawing.Size(89, 13);
+      this.trainingLabel.TabIndex = 3;
+      this.trainingLabel.Text = "Training samples:";
+      // 
+      // trainingSamplesEndTextBox
+      // 
+      this.trainingSamplesEndTextBox.Location = new System.Drawing.Point(221, 17);
+      this.trainingSamplesEndTextBox.Name = "trainingSamplesEndTextBox";
+      this.trainingSamplesEndTextBox.Size = new System.Drawing.Size(96, 20);
+      this.trainingSamplesEndTextBox.TabIndex = 10;
+      this.trainingSamplesEndTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.trainingSamplesEndTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // validationSamplesEndTextBox
+      // 
+      this.validationSamplesEndTextBox.Location = new System.Drawing.Point(221, 43);
+      this.validationSamplesEndTextBox.Name = "validationSamplesEndTextBox";
+      this.validationSamplesEndTextBox.Size = new System.Drawing.Size(96, 20);
+      this.validationSamplesEndTextBox.TabIndex = 13;
+      this.validationSamplesEndTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.validationSamplesEndTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // validationSamplesStartTextBox
+      // 
+      this.validationSamplesStartTextBox.Location = new System.Drawing.Point(119, 43);
+      this.validationSamplesStartTextBox.Name = "validationSamplesStartTextBox";
+      this.validationSamplesStartTextBox.Size = new System.Drawing.Size(96, 20);
+      this.validationSamplesStartTextBox.TabIndex = 12;
+      this.validationSamplesStartTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.validationSamplesStartTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // validationLabel
+      // 
+      this.validationLabel.AutoSize = true;
+      this.validationLabel.Location = new System.Drawing.Point(5, 46);
+      this.validationLabel.Name = "validationLabel";
+      this.validationLabel.Size = new System.Drawing.Size(97, 13);
+      this.validationLabel.TabIndex = 11;
+      this.validationLabel.Text = "Validation samples:";
+      // 
+      // testSamplesEndTextBox
+      // 
+      this.testSamplesEndTextBox.Location = new System.Drawing.Point(221, 68);
+      this.testSamplesEndTextBox.Name = "testSamplesEndTextBox";
+      this.testSamplesEndTextBox.Size = new System.Drawing.Size(96, 20);
+      this.testSamplesEndTextBox.TabIndex = 16;
+      this.testSamplesEndTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.testSamplesEndTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // testSamplesStartTextBox
+      // 
+      this.testSamplesStartTextBox.Location = new System.Drawing.Point(119, 68);
+      this.testSamplesStartTextBox.Name = "testSamplesStartTextBox";
+      this.testSamplesStartTextBox.Size = new System.Drawing.Size(96, 20);
+      this.testSamplesStartTextBox.TabIndex = 15;
+      this.testSamplesStartTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.testSamplesStartTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // testLabel
+      // 
+      this.testLabel.AutoSize = true;
+      this.testLabel.Location = new System.Drawing.Point(30, 71);
+      this.testLabel.Name = "testLabel";
+      this.testLabel.Size = new System.Drawing.Size(72, 13);
+      this.testLabel.TabIndex = 14;
+      this.testLabel.Text = "Test samples:";
+      // 
+      // autoregressiveCheckBox
+      // 
+      this.autoregressiveCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Top;
+      this.autoregressiveCheckBox.AutoSize = true;
+      this.autoregressiveCheckBox.Enabled = false;
+      this.autoregressiveCheckBox.Location = new System.Drawing.Point(131, 83);
+      this.autoregressiveCheckBox.Name = "autoregressiveCheckBox";
+      this.autoregressiveCheckBox.Size = new System.Drawing.Size(15, 14);
+      this.autoregressiveCheckBox.TabIndex = 22;
+      this.autoregressiveCheckBox.UseVisualStyleBackColor = true;
+      this.autoregressiveCheckBox.CheckedChanged += new System.EventHandler(this.autoregressiveCheckBox_CheckedChanged);
+      // 
+      // partitioningGroupBox
+      // 
+      this.partitioningGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.partitioningGroupBox.Controls.Add(this.validationSamplesEndTextBox);
+      this.partitioningGroupBox.Controls.Add(this.trainingLabel);
+      this.partitioningGroupBox.Controls.Add(this.trainingSamplesStartTextBox);
+      this.partitioningGroupBox.Controls.Add(this.trainingSamplesEndTextBox);
+      this.partitioningGroupBox.Controls.Add(this.validationLabel);
+      this.partitioningGroupBox.Controls.Add(this.testSamplesEndTextBox);
+      this.partitioningGroupBox.Controls.Add(this.validationSamplesStartTextBox);
+      this.partitioningGroupBox.Controls.Add(this.testSamplesStartTextBox);
+      this.partitioningGroupBox.Controls.Add(this.testLabel);
+      this.partitioningGroupBox.Location = new System.Drawing.Point(3, 452);
+      this.partitioningGroupBox.Name = "partitioningGroupBox";
+      this.partitioningGroupBox.Size = new System.Drawing.Size(326, 100);
+      this.partitioningGroupBox.TabIndex = 25;
+      this.partitioningGroupBox.TabStop = false;
+      this.partitioningGroupBox.Text = "Data set partitions:";
+      // 
+      // openFileDialog
+      // 
+      this.openFileDialog.DefaultExt = "txt";
+      this.openFileDialog.FileName = "txt";
+      this.openFileDialog.Filter = "Text files|*.txt|All files|*.*";
+      this.openFileDialog.Title = "Import data set from file";
+      // 
+      // classificationRadioButton
+      // 
+      this.classificationRadioButton.AutoSize = true;
+      this.classificationRadioButton.Checked = true;
+      this.classificationRadioButton.Location = new System.Drawing.Point(6, 16);
+      this.classificationRadioButton.Name = "classificationRadioButton";
+      this.classificationRadioButton.Size = new System.Drawing.Size(86, 17);
+      this.classificationRadioButton.TabIndex = 28;
+      this.classificationRadioButton.TabStop = true;
+      this.classificationRadioButton.Text = "Classification";
+      this.classificationRadioButton.UseVisualStyleBackColor = true;
+      this.classificationRadioButton.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
+      // 
+      // regressionRadioButton
+      // 
+      this.regressionRadioButton.AutoSize = true;
+      this.regressionRadioButton.Location = new System.Drawing.Point(6, 39);
+      this.regressionRadioButton.Name = "regressionRadioButton";
+      this.regressionRadioButton.Size = new System.Drawing.Size(78, 17);
+      this.regressionRadioButton.TabIndex = 29;
+      this.regressionRadioButton.Text = "Regression";
+      this.regressionRadioButton.UseVisualStyleBackColor = true;
+      this.regressionRadioButton.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
+      // 
+      // timeSeriesRadioButton
+      // 
+      this.timeSeriesRadioButton.AutoSize = true;
+      this.timeSeriesRadioButton.Location = new System.Drawing.Point(6, 62);
+      this.timeSeriesRadioButton.Name = "timeSeriesRadioButton";
+      this.timeSeriesRadioButton.Size = new System.Drawing.Size(119, 17);
+      this.timeSeriesRadioButton.TabIndex = 30;
+      this.timeSeriesRadioButton.Text = "Time series forecast";
+      this.timeSeriesRadioButton.UseVisualStyleBackColor = true;
+      this.timeSeriesRadioButton.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
+      // 
+      // minTimeOffsetLabel
+      // 
+      this.minTimeOffsetLabel.AutoSize = true;
+      this.minTimeOffsetLabel.Enabled = false;
+      this.minTimeOffsetLabel.Location = new System.Drawing.Point(38, 106);
+      this.minTimeOffsetLabel.Name = "minTimeOffsetLabel";
+      this.minTimeOffsetLabel.Size = new System.Drawing.Size(87, 13);
+      this.minTimeOffsetLabel.TabIndex = 31;
+      this.minTimeOffsetLabel.Text = "Min. Time Offset:";
+      // 
+      // minTimeOffsetTextBox
+      // 
+      this.minTimeOffsetTextBox.Enabled = false;
+      this.minTimeOffsetTextBox.Location = new System.Drawing.Point(131, 103);
+      this.minTimeOffsetTextBox.Name = "minTimeOffsetTextBox";
+      this.minTimeOffsetTextBox.Size = new System.Drawing.Size(96, 20);
+      this.minTimeOffsetTextBox.TabIndex = 32;
+      this.minTimeOffsetTextBox.Validated += new System.EventHandler(this.timeOffsetTextBox_Validated);
+      this.minTimeOffsetTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.timeOffsetTextBox_Validating);
+      // 
+      // learningTaskGroupBox
+      // 
+      this.learningTaskGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.learningTaskGroupBox.Controls.Add(this.autoregressiveLabel);
+      this.learningTaskGroupBox.Controls.Add(this.classificationRadioButton);
+      this.learningTaskGroupBox.Controls.Add(this.minTimeOffsetLabel);
+      this.learningTaskGroupBox.Controls.Add(this.minTimeOffsetTextBox);
+      this.learningTaskGroupBox.Controls.Add(this.maxTimeOffsetLabel);
+      this.learningTaskGroupBox.Controls.Add(this.regressionRadioButton);
+      this.learningTaskGroupBox.Controls.Add(this.maxTimeOffsetTextBox);
+      this.learningTaskGroupBox.Controls.Add(this.timeSeriesRadioButton);
+      this.learningTaskGroupBox.Controls.Add(this.autoregressiveCheckBox);
+      this.learningTaskGroupBox.Location = new System.Drawing.Point(335, 452);
+      this.learningTaskGroupBox.Name = "learningTaskGroupBox";
+      this.learningTaskGroupBox.Size = new System.Drawing.Size(326, 163);
+      this.learningTaskGroupBox.TabIndex = 35;
+      this.learningTaskGroupBox.TabStop = false;
+      this.learningTaskGroupBox.Text = "Learning task";
+      // 
+      // autoregressiveLabel
+      // 
+      this.autoregressiveLabel.AutoSize = true;
+      this.autoregressiveLabel.Enabled = false;
+      this.autoregressiveLabel.Location = new System.Drawing.Point(45, 83);
+      this.autoregressiveLabel.Name = "autoregressiveLabel";
+      this.autoregressiveLabel.Size = new System.Drawing.Size(80, 13);
+      this.autoregressiveLabel.TabIndex = 35;
+      this.autoregressiveLabel.Text = "Autoregressive:";
+      // 
+      // maxTimeOffsetLabel
+      // 
+      this.maxTimeOffsetLabel.AutoSize = true;
+      this.maxTimeOffsetLabel.Enabled = false;
+      this.maxTimeOffsetLabel.Location = new System.Drawing.Point(35, 132);
+      this.maxTimeOffsetLabel.Name = "maxTimeOffsetLabel";
+      this.maxTimeOffsetLabel.Size = new System.Drawing.Size(90, 13);
+      this.maxTimeOffsetLabel.TabIndex = 33;
+      this.maxTimeOffsetLabel.Text = "Max. Time Offset:";
+      // 
+      // maxTimeOffsetTextBox
+      // 
+      this.maxTimeOffsetTextBox.Enabled = false;
+      this.maxTimeOffsetTextBox.Location = new System.Drawing.Point(131, 129);
+      this.maxTimeOffsetTextBox.Name = "maxTimeOffsetTextBox";
+      this.maxTimeOffsetTextBox.Size = new System.Drawing.Size(96, 20);
+      this.maxTimeOffsetTextBox.TabIndex = 34;
+      this.maxTimeOffsetTextBox.Validated += new System.EventHandler(this.timeOffsetTextBox_Validated);
+      this.maxTimeOffsetTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.timeOffsetTextBox_Validating);
+      // 
+      // datasetView1
+      // 
+      this.datasetView1.Location = new System.Drawing.Point(3, 32);
+      this.datasetView1.Name = "datasetView1";
+      this.datasetView1.Size = new System.Drawing.Size(770, 414);
+      this.datasetView1.TabIndex = 36;
+      // 
+      // ProblemView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.datasetView1);
+      this.Controls.Add(this.learningTaskGroupBox);
+      this.Controls.Add(this.partitioningGroupBox);
+      this.Controls.Add(this.importButton);
+      this.Name = "ProblemView";
+      this.Size = new System.Drawing.Size(776, 615);
+      this.partitioningGroupBox.ResumeLayout(false);
+      this.partitioningGroupBox.PerformLayout();
+      this.learningTaskGroupBox.ResumeLayout(false);
+      this.learningTaskGroupBox.PerformLayout();
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button importButton;
+    private System.Windows.Forms.TextBox trainingSamplesStartTextBox;
+    private System.Windows.Forms.Label trainingLabel;
+    private System.Windows.Forms.TextBox trainingSamplesEndTextBox;
+    private System.Windows.Forms.TextBox validationSamplesEndTextBox;
+    private System.Windows.Forms.TextBox validationSamplesStartTextBox;
+    private System.Windows.Forms.Label validationLabel;
+    private System.Windows.Forms.TextBox testSamplesEndTextBox;
+    private System.Windows.Forms.TextBox testSamplesStartTextBox;
+    private System.Windows.Forms.Label testLabel;
+    private System.Windows.Forms.CheckBox autoregressiveCheckBox;
+    private System.Windows.Forms.GroupBox partitioningGroupBox;
+    private System.Windows.Forms.OpenFileDialog openFileDialog;
+    private System.Windows.Forms.RadioButton classificationRadioButton;
+    private System.Windows.Forms.RadioButton regressionRadioButton;
+    private System.Windows.Forms.RadioButton timeSeriesRadioButton;
+    private System.Windows.Forms.Label minTimeOffsetLabel;
+    private System.Windows.Forms.TextBox minTimeOffsetTextBox;
+    private System.Windows.Forms.GroupBox learningTaskGroupBox;
+    private System.Windows.Forms.Label maxTimeOffsetLabel;
+    private System.Windows.Forms.TextBox maxTimeOffsetTextBox;
+    private System.Windows.Forms.Label autoregressiveLabel;
+    private HeuristicLab.DataAnalysis.DatasetView datasetView1;
+  }
+}
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.cs	(revision 2223)
@@ -0,0 +1,238 @@
+﻿#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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.DataAnalysis;
+using System.Diagnostics;
+using HeuristicLab.CEDMA.Core;
+
+namespace HeuristicLab.CEDMA.Server {
+  public partial class ProblemView : ViewBase {
+    private Problem problem;
+
+    public ProblemView(Problem problem) {
+      this.problem = problem;
+      problem.Changed += (sender, args) => UpdateControls();
+      InitializeComponent();
+      UpdateControls();
+    }
+
+    protected override void UpdateControls() {
+      base.UpdateControls();
+      trainingSamplesStartTextBox.Text = problem.TrainingSamplesStart.ToString();
+      trainingSamplesEndTextBox.Text = problem.TrainingSamplesEnd.ToString();
+      validationSamplesStartTextBox.Text = problem.ValidationSamplesStart.ToString();
+      validationSamplesEndTextBox.Text = problem.ValidationSamplesEnd.ToString();
+      testSamplesStartTextBox.Text = problem.TestSamplesStart.ToString();
+      testSamplesEndTextBox.Text = problem.TestSamplesEnd.ToString();
+      minTimeOffsetTextBox.Text = problem.MinTimeOffset.ToString();
+      maxTimeOffsetTextBox.Text = problem.MaxTimeOffset.ToString();
+      autoregressiveCheckBox.Checked = problem.AutoRegressive;
+      switch (problem.LearningTask) {
+        case LearningTask.Classification: classificationRadioButton.Checked = true; break;
+        case LearningTask.Regression: regressionRadioButton.Checked = true; break;
+        case LearningTask.TimeSeries: timeSeriesRadioButton.Checked = true; break;
+      }
+    }
+
+    private void importButton_Click(object sender, EventArgs e) {
+      if (openFileDialog.ShowDialog(this) == DialogResult.OK) {
+        DatasetParser parser = new DatasetParser();
+        bool success = false;
+        try {
+          try {
+            parser.Import(openFileDialog.FileName, true);
+            success = true;
+          }
+          catch (DataFormatException ex) {
+            ShowWarningMessageBox(ex);
+            // not possible to parse strictly => clear and try to parse non-strict
+            parser.Reset();
+            parser.Import(openFileDialog.FileName, false);
+            success = true;
+          }
+        }
+        catch (DataFormatException ex) {
+          // if the non-strict parsing also failed then show the exception
+          ShowErrorMessageBox(ex);
+        }
+        if (success) {
+          Dataset dataset = (Dataset)problem.Dataset;
+          dataset.Rows = parser.Rows;
+          dataset.Columns = parser.Columns;
+          for (int i = 0; i < parser.VariableNames.Length; i++) {
+            dataset.SetVariableName(i, parser.VariableNames[i]);
+          }
+          dataset.Name = parser.ProblemName;
+          dataset.Samples = new double[dataset.Rows * dataset.Columns];
+          Array.Copy(parser.Samples, dataset.Samples, dataset.Columns * dataset.Rows);
+          datasetView1.Dataset = problem.Dataset;
+
+          problem.TrainingSamplesStart = parser.TrainingSamplesStart;
+          problem.ValidationSamplesEnd = parser.TrainingSamplesStart;
+          problem.TrainingSamplesEnd = parser.TrainingSamplesEnd;
+          problem.ValidationSamplesStart = parser.ValidationSamplesStart;
+          problem.ValidationSamplesEnd = parser.ValidationSamplesEnd;
+          problem.TestSamplesStart = parser.TestSamplesStart;
+          problem.TestSamplesEnd = parser.TestSamplesEnd;
+          //problem.AllowedTargetVariables.Add(parser.TargetVariable);
+          problem.FireChanged();
+          //List<int> nonInputVariables = parser.NonInputVariables;
+          //for (int i = 0; i < dataset.Columns; i++) {
+          //  if (!nonInputVariables.Contains(i)) problem.AllowedInputVariables.Add(i);
+          //}
+          Refresh();
+        }
+      }
+    }
+
+    //private void targetsListBox_ItemCheck(object sender, ItemCheckEventArgs e) {
+    //  if (e.NewValue == CheckState.Checked && !problem.AllowedTargetVariables.Contains(e.Index))
+    //    problem.AllowedTargetVariables.Add(e.Index);
+    //  else if (e.NewValue == CheckState.Unchecked && problem.AllowedTargetVariables.Contains(e.Index))
+    //    problem.AllowedTargetVariables.Remove(e.Index);
+    //}
+
+    //private void inputsListBox_ItemCheck(object sender, ItemCheckEventArgs e) {
+    //  if (e.NewValue == CheckState.Checked && !problem.AllowedInputVariables.Contains(e.Index))
+    //    problem.AllowedInputVariables.Add(e.Index);
+    //  else if (e.NewValue == CheckState.Unchecked && problem.AllowedInputVariables.Contains(e.Index))
+    //    problem.AllowedInputVariables.Remove(e.Index);
+    //}
+
+    private void autoregressiveCheckBox_CheckedChanged(object sender, EventArgs e) {
+      problem.AutoRegressive = autoregressiveCheckBox.Checked;
+    }
+
+    private void samplesTextBox_Validating(object sender, CancelEventArgs e) {
+      try {
+        int trainingStart = int.Parse(trainingSamplesStartTextBox.Text);
+        int trainingEnd = int.Parse(trainingSamplesEndTextBox.Text);
+        int validationStart = int.Parse(validationSamplesStartTextBox.Text);
+        int validationEnd = int.Parse(validationSamplesEndTextBox.Text);
+        int testStart = int.Parse(testSamplesStartTextBox.Text);
+        int testEnd = int.Parse(testSamplesEndTextBox.Text);
+        if (trainingStart < 0 || validationStart < 0 || testStart < 0 ||
+          trainingEnd >= problem.Dataset.Rows || validationEnd >= problem.Dataset.Rows || testEnd >= problem.Dataset.Rows ||
+          trainingStart >= trainingEnd ||
+          validationStart >= validationEnd ||
+          testStart >= testEnd ||
+          IsOverlapping(trainingStart, trainingEnd, validationStart, validationEnd) ||
+          IsOverlapping(trainingStart, trainingEnd, testStart, testEnd) ||
+          IsOverlapping(validationStart, validationEnd, testStart, testEnd))
+          ColorSamplesTextBoxes(Color.Red);
+        else
+          ColorSamplesTextBoxes(Color.White);
+      }
+      catch (FormatException ex) {
+        ColorSamplesTextBoxes(Color.Red);
+      }
+    }
+
+    private void samplesTextBox_Validated(object sender, EventArgs e) {
+      problem.TrainingSamplesStart = int.Parse(trainingSamplesStartTextBox.Text);
+      problem.TrainingSamplesEnd = int.Parse(trainingSamplesEndTextBox.Text);
+      problem.ValidationSamplesStart = int.Parse(validationSamplesStartTextBox.Text);
+      problem.ValidationSamplesEnd = int.Parse(validationSamplesEndTextBox.Text);
+      problem.TestSamplesStart = int.Parse(testSamplesStartTextBox.Text);
+      problem.TestSamplesEnd = int.Parse(testSamplesEndTextBox.Text);
+    }
+
+    private void ColorSamplesTextBoxes(Color color) {
+      trainingSamplesStartTextBox.BackColor = color;
+      trainingSamplesEndTextBox.BackColor = color;
+      validationSamplesStartTextBox.BackColor = color;
+      validationSamplesEndTextBox.BackColor = color;
+      testSamplesStartTextBox.BackColor = color;
+      testSamplesEndTextBox.BackColor = color;
+    }
+
+    private bool IsOverlapping(int x0, int y0, int x1, int y1) {
+      Trace.Assert(x0 <= y0 && x1 <= y1);
+      int tmp;
+      // make sure that x0,y0 is the left interval
+      if (x1 < x0) {
+        tmp = x1;
+        x1 = x0;
+        x0 = tmp;
+        tmp = y1;
+        y1 = y0;
+        y0 = tmp;
+      }
+      return y0 > x1;
+    }
+    private void ShowWarningMessageBox(Exception ex) {
+      MessageBox.Show(ex.Message,
+                      "Warning - " + ex.GetType().Name,
+                      MessageBoxButtons.OK,
+                      MessageBoxIcon.Warning);
+    }
+    private void ShowErrorMessageBox(Exception ex) {
+      MessageBox.Show(BuildErrorMessage(ex),
+                      "Error - " + ex.GetType().Name,
+                      MessageBoxButtons.OK,
+                      MessageBoxIcon.Error);
+    }
+    private string BuildErrorMessage(Exception ex) {
+      StringBuilder sb = new StringBuilder();
+      sb.Append("Sorry, but something went wrong!\n\n" + ex.Message + "\n\n" + ex.StackTrace);
+
+      while (ex.InnerException != null) {
+        ex = ex.InnerException;
+        sb.Append("\n\n-----\n\n" + ex.Message + "\n\n" + ex.StackTrace);
+      }
+      return sb.ToString();
+    }
+
+    #region gui events
+    private void radioButton_CheckedChanged(object sender, EventArgs e) {
+      minTimeOffsetLabel.Enabled = timeSeriesRadioButton.Checked;
+      minTimeOffsetTextBox.Enabled = timeSeriesRadioButton.Checked;
+      maxTimeOffsetLabel.Enabled = timeSeriesRadioButton.Checked;
+      maxTimeOffsetTextBox.Enabled = timeSeriesRadioButton.Checked;
+      autoregressiveCheckBox.Enabled = timeSeriesRadioButton.Checked;
+      autoregressiveLabel.Enabled = timeSeriesRadioButton.Checked;
+      if (timeSeriesRadioButton.Checked) problem.LearningTask = LearningTask.TimeSeries;
+      else if (classificationRadioButton.Checked) problem.LearningTask = LearningTask.Classification;
+      else if (regressionRadioButton.Checked) problem.LearningTask = LearningTask.Regression;
+    }
+
+    private void timeOffsetTextBox_Validating(object sender, CancelEventArgs e) {
+      int min, max;
+      e.Cancel = !int.TryParse(minTimeOffsetTextBox.Text, out min);
+      e.Cancel = !int.TryParse(maxTimeOffsetTextBox.Text, out max);
+      e.Cancel = min > max;
+    }
+    private void timeOffsetTextBox_Validated(object sender, EventArgs e) {
+      problem.MinTimeOffset = int.Parse(minTimeOffsetTextBox.Text);
+      problem.MaxTimeOffset = int.Parse(maxTimeOffsetTextBox.Text);
+    }
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.resx
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.resx	(revision 2223)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.resx	(revision 2223)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/Server.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/Server.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/Server.cs	(revision 2223)
@@ -27,23 +27,23 @@
 using System.Net;
 using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
 using System.ServiceModel.Description;
 using HeuristicLab.Grid;
 using HeuristicLab.Grid.HiveBridge;
 using HeuristicLab.Core;
+using HeuristicLab.Modeling.Database;
+using HeuristicLab.Modeling.Database.SQLServerCompact;
 
 namespace HeuristicLab.CEDMA.Server {
   public class Server : IViewable {
-    private static readonly string rdfFile = AppDomain.CurrentDomain.BaseDirectory + "rdf_store.db3";
-    private static readonly string rdfConnectionString = "sqlite:rdf:Data Source=\"" + rdfFile + "\"";
+    private static readonly string sqlServerCompactFile = AppDomain.CurrentDomain.BaseDirectory + "HeuristicLab.Modeling.database.sdf";
+    private static readonly string sqlServerCompactConnectionString = @"Data Source=" + sqlServerCompactFile;
 
-    private ServiceHost host;
-    private Store store;
-
+    private DatabaseService database;
     private IDispatcher dispatcher;
     public IDispatcher Dispatcher { get { return dispatcher; } }
     private IExecuter executer;
     public IExecuter Executer { get { return executer; } }
+    private Problem problem;
+    public Problem Problem { get { return problem; } }
 
     private string gridServiceUrl;
@@ -53,46 +53,16 @@
     }
 
-    private string cedmaServiceUrl;
-    public string CedmaServiceUrl {
-      get { return cedmaServiceUrl; }
-      set { cedmaServiceUrl = value; }
-    }
-
     public Server() {
-      IPAddress[] addresses = Dns.GetHostAddresses(Dns.GetHostName());
-      // windows XP returns the external ip on index 0 while windows vista returns the external ip as one of the last entries
-      // also if IPv6 protocol is installed we want to find an entry that is IPv4
-      int index = 0;
-      if (System.Environment.OSVersion.Version.Major >= 6) {
-        for (index = addresses.Length - 1; index >= 0; index--)
-          if (addresses[index].AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
-            break;
+      database = new DatabaseService(sqlServerCompactConnectionString);
+      problem = new Problem();
+      try {
+        problem.Dataset = database.GetDataset();
       }
-      cedmaServiceUrl = "net.tcp://" + addresses[index] + ":8002/CEDMA";
-      store = new Store(rdfConnectionString);
-    }
-
-    public void Start() {
-      host = new ServiceHost(store, new Uri(cedmaServiceUrl));
-      ServiceThrottlingBehavior throttlingBehavior = new ServiceThrottlingBehavior();
-      throttlingBehavior.MaxConcurrentSessions = 20;
-      host.Description.Behaviors.Add(throttlingBehavior);
-      try {
-        NetTcpBinding binding = new NetTcpBinding();
-        binding.SendTimeout = new TimeSpan(10, 0, 0);
-        binding.MaxReceivedMessageSize = int.MaxValue;
-        binding.ReaderQuotas.MaxStringContentLength = int.MaxValue;
-        binding.ReaderQuotas.MaxArrayLength = int.MaxValue;
-        host.AddServiceEndpoint(typeof(IStore), binding, cedmaServiceUrl);
-        host.Open();
-      }
-      catch (CommunicationException ex) {
-        MessageBox.Show("An exception occurred: " + ex.Message);
-        host.Abort();
+      catch (InvalidOperationException ex) {
       }
     }
 
     internal void Connect(string serverUrl) {
-      dispatcher = new SimpleDispatcher(store);
+      dispatcher = new SimpleDispatcher(database, problem);
       IGridServer gridServer = null;
       if (serverUrl.Contains("ExecutionEngine")) {
@@ -102,5 +72,5 @@
         gridServer = new GridServerProxy(serverUrl);
       }
-      executer = new GridExecuter(dispatcher, store, gridServer);
+      executer = new GridExecuter(dispatcher, gridServer, database);
       executer.Start();
     }
@@ -110,5 +80,4 @@
       return new ServerView(this);
     }
-
     #endregion
   }
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerApplication.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerApplication.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerApplication.cs	(revision 2223)
@@ -27,14 +27,13 @@
 
 namespace HeuristicLab.CEDMA.Server {
-  [ClassInfo(Name = "CEDMA Server", Description = "Server to execute CEDMA agents.", AutoRestart=true)]
+  [ClassInfo(Name = "CEDMA", Description = "Cooperative Evolutionary Data Mining.", AutoRestart=true)]
   class ServerApplication : ApplicationBase {
     public override void Run() {
       Server server = new Server();
-      server.Start();
       Form mainForm = new Form();
       UserControl serverControl = (UserControl)server.CreateView();
       serverControl.Dock = DockStyle.Fill;
       mainForm.Controls.Add(serverControl);
-      mainForm.Name = "CEDMA Server";
+      mainForm.Name = "CEDMA";
       Application.Run(mainForm);
     }
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.cs	(revision 2223)
@@ -32,6 +32,4 @@
 using HeuristicLab.PluginInfrastructure;
 using System.Net;
-using HeuristicLab.CEDMA.DB;
-using HeuristicLab.CEDMA.DB.Interfaces;
 using System.Data.Common;
 using System.Threading;
@@ -47,5 +45,4 @@
       this.server = server;
       InitializeComponent();
-      addressTextBox.Text = server.CedmaServiceUrl;
     }
 
@@ -58,4 +55,7 @@
       dispatcherControl.Dock = DockStyle.Fill;
       dispatcherTabPage.Controls.Add(dispatcherControl);
+      UserControl problemControl = (UserControl)server.Problem.CreateView();
+      problemControl.Dock = DockStyle.Fill;
+      problemPage.Controls.Add(problemControl);
       connectButton.Enabled = false;      
     }
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.designer.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.designer.cs	(revision 2223)
@@ -45,6 +45,4 @@
     /// </summary>
     private void InitializeComponent() {
-      this.addressTextBox = new System.Windows.Forms.TextBox();
-      this.externalAddressLabel = new System.Windows.Forms.Label();
       this.gridAddressLabel = new System.Windows.Forms.Label();
       this.address = new System.Windows.Forms.TextBox();
@@ -53,23 +51,7 @@
       this.executerTabPage = new System.Windows.Forms.TabPage();
       this.dispatcherTabPage = new System.Windows.Forms.TabPage();
+      this.problemPage = new System.Windows.Forms.TabPage();
       this.tabControl.SuspendLayout();
       this.SuspendLayout();
-      // 
-      // addressTextBox
-      // 
-      this.addressTextBox.Location = new System.Drawing.Point(106, 6);
-      this.addressTextBox.Name = "addressTextBox";
-      this.addressTextBox.ReadOnly = true;
-      this.addressTextBox.Size = new System.Drawing.Size(229, 20);
-      this.addressTextBox.TabIndex = 0;
-      // 
-      // externalAddressLabel
-      // 
-      this.externalAddressLabel.AutoSize = true;
-      this.externalAddressLabel.Location = new System.Drawing.Point(12, 9);
-      this.externalAddressLabel.Name = "externalAddressLabel";
-      this.externalAddressLabel.Size = new System.Drawing.Size(48, 13);
-      this.externalAddressLabel.TabIndex = 3;
-      this.externalAddressLabel.Text = "&Address:";
       // 
       // gridAddressLabel
@@ -106,4 +88,5 @@
       this.tabControl.Controls.Add(this.executerTabPage);
       this.tabControl.Controls.Add(this.dispatcherTabPage);
+      this.tabControl.Controls.Add(this.problemPage);
       this.tabControl.Location = new System.Drawing.Point(3, 58);
       this.tabControl.Name = "tabControl";
@@ -132,5 +115,15 @@
       this.dispatcherTabPage.UseVisualStyleBackColor = true;
       // 
-      // ServerForm
+      // problemPage
+      // 
+      this.problemPage.Location = new System.Drawing.Point(4, 22);
+      this.problemPage.Name = "problemPage";
+      this.problemPage.Padding = new System.Windows.Forms.Padding(3);
+      this.problemPage.Size = new System.Drawing.Size(565, 517);
+      this.problemPage.TabIndex = 2;
+      this.problemPage.Text = "Problem";
+      this.problemPage.UseVisualStyleBackColor = true;
+      // 
+      // ServerView
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -140,7 +133,5 @@
       this.Controls.Add(this.gridAddressLabel);
       this.Controls.Add(this.address);
-      this.Controls.Add(this.externalAddressLabel);
-      this.Controls.Add(this.addressTextBox);
-      this.Name = "ServerForm";
+      this.Name = "ServerView";
       this.Size = new System.Drawing.Size(579, 604);
       this.tabControl.ResumeLayout(false);
@@ -152,6 +143,4 @@
     #endregion
 
-    private System.Windows.Forms.TextBox addressTextBox;
-    private System.Windows.Forms.Label externalAddressLabel;
     private System.Windows.Forms.Label gridAddressLabel;
     private System.Windows.Forms.TextBox address;
@@ -160,4 +149,5 @@
     private System.Windows.Forms.TabPage executerTabPage;
     private System.Windows.Forms.TabPage dispatcherTabPage;
+    private System.Windows.Forms.TabPage problemPage;
   }
 }
Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs	(revision 2223)
@@ -27,6 +27,4 @@
 using System.Net;
 using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
 using System.ServiceModel.Description;
 using System.Linq;
@@ -35,4 +33,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.Modeling;
+using HeuristicLab.Modeling.Database;
 
 namespace HeuristicLab.CEDMA.Server {
@@ -44,11 +43,9 @@
     }
 
-    private Random random;
-    private IStore store;
+    private Random random;    
     private Dictionary<int, List<AlgorithmConfiguration>> finishedAndDispatchedRuns;
 
-    public SimpleDispatcher(IStore store)
-      : base(store) {
-      this.store = store;
+    public SimpleDispatcher(IModelingDatabase database, Problem problem)
+      : base(database, problem) {      
       random = new Random();
       finishedAndDispatchedRuns = new Dictionary<int, List<AlgorithmConfiguration>>();
@@ -56,8 +53,8 @@
     }
 
-    public override IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem) {
+    public override HeuristicLab.Modeling.IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem) {
       DiscoveryService ds = new DiscoveryService();
-      IAlgorithm[] algos = ds.GetInstances<IAlgorithm>();
-      IAlgorithm selectedAlgorithm = null;
+      HeuristicLab.Modeling.IAlgorithm[] algos = ds.GetInstances<HeuristicLab.Modeling.IAlgorithm>();
+      HeuristicLab.Modeling.IAlgorithm selectedAlgorithm = null;
       switch (problem.LearningTask) {
         case LearningTask.Regression: {
@@ -86,5 +83,5 @@
     }
 
-    private IAlgorithm ChooseDeterministic(int targetVariable, int[] inputVariables, IEnumerable<IAlgorithm> algos) {
+    private HeuristicLab.Modeling.IAlgorithm ChooseDeterministic(int targetVariable, int[] inputVariables, IEnumerable<HeuristicLab.Modeling.IAlgorithm> algos) {
       var deterministicAlgos = algos
         .Where(a => (a as IStochasticAlgorithm) == null)
@@ -95,5 +92,5 @@
     }
 
-    private IAlgorithm ChooseStochastic(IEnumerable<IAlgorithm> regressionAlgos) {
+    private HeuristicLab.Modeling.IAlgorithm ChooseStochastic(IEnumerable<HeuristicLab.Modeling.IAlgorithm> regressionAlgos) {
       var stochasticAlgos = regressionAlgos.Where(a => (a as IStochasticAlgorithm) != null);
       if (stochasticAlgos.Count() == 0) return null;
@@ -102,53 +99,53 @@
 
     private void PopulateFinishedRuns() {
-      Dictionary<Entity, Entity> processedModels = new Dictionary<Entity, Entity>();
-      var datasetBindings = store
-        .Query(
-        "?Dataset <" + Ontology.InstanceOf + "> <" + Ontology.TypeDataSet + "> .", 0, 1)
-        .Select(x => (Entity)x.Get("Dataset"));
-
-      if (datasetBindings.Count() > 0) {
-        var datasetEntity = datasetBindings.ElementAt(0);
-
-        DataSet ds = new DataSet(store, datasetEntity);
-        var result = store
-          .Query(
-          "?Model <" + Ontology.TargetVariable + "> ?TargetVariable ." + Environment.NewLine +
-          "?Model <" + Ontology.Name + "> ?AlgoName .",
-          0, 1000)
-          .Select(x => new Resource[] { (Literal)x.Get("TargetVariable"), (Literal)x.Get("AlgoName"), (Entity)x.Get("Model") });
-
-        foreach (Resource[] row in result) {
-          Entity model = ((Entity)row[2]);
-          if (!processedModels.ContainsKey(model)) {
-            processedModels.Add(model, model);
-
-            string targetVariable = (string)((Literal)row[0]).Value;
-            string algoName = (string)((Literal)row[1]).Value;
-            int targetVariableIndex = ds.Problem.Dataset.GetVariableIndex(targetVariable);
-
-            var inputVariableLiterals = store
-              .Query(
-                "<" + model.Uri + "> <" + Ontology.HasInputVariable + "> ?InputVariable ." + Environment.NewLine +
-                "?InputVariable <" + Ontology.Name + "> ?Name .",
-                0, 1000)
-              .Select(x => (Literal)x.Get("Name"))
-              .Select(l => (string)l.Value)
-              .Distinct();
-
-            List<int> inputVariables = new List<int>();
-            foreach (string variableName in inputVariableLiterals) {
-              int variableIndex = ds.Problem.Dataset.GetVariableIndex(variableName);
-              inputVariables.Add(variableIndex);
-            }
-            if (!AlgorithmFinishedOrDispatched(targetVariableIndex, inputVariables.ToArray(), algoName)) {
-              AddDispatchedRun(targetVariableIndex, inputVariables.ToArray(), algoName);
-            }
-          }
-        }
-      }
-    }
-
-    private void SetProblemParameters(IAlgorithm algo, Problem problem, int targetVariable, int[] inputVariables) {
+      //Dictionary<Entity, Entity> processedModels = new Dictionary<Entity, Entity>();
+      //var datasetBindings = store
+      //  .Query(
+      //  "?Dataset <" + Ontology.InstanceOf + "> <" + Ontology.TypeDataSet + "> .", 0, 1)
+      //  .Select(x => (Entity)x.Get("Dataset"));
+
+      //if (datasetBindings.Count() > 0) {
+      //  var datasetEntity = datasetBindings.ElementAt(0);
+
+      //  DataSet ds = new DataSet(store, datasetEntity);
+      //  var result = store
+      //    .Query(
+      //    "?Model <" + Ontology.TargetVariable + "> ?TargetVariable ." + Environment.NewLine +
+      //    "?Model <" + Ontology.Name + "> ?AlgoName .",
+      //    0, 1000)
+      //    .Select(x => new Resource[] { (Literal)x.Get("TargetVariable"), (Literal)x.Get("AlgoName"), (Entity)x.Get("Model") });
+
+      //  foreach (Resource[] row in result) {
+      //    Entity model = ((Entity)row[2]);
+      //    if (!processedModels.ContainsKey(model)) {
+      //      processedModels.Add(model, model);
+
+      //      string targetVariable = (string)((Literal)row[0]).Value;
+      //      string algoName = (string)((Literal)row[1]).Value;
+      //      int targetVariableIndex = ds.Problem.Dataset.GetVariableIndex(targetVariable);
+
+      //      var inputVariableLiterals = store
+      //        .Query(
+      //          "<" + model.Uri + "> <" + Ontology.HasInputVariable + "> ?InputVariable ." + Environment.NewLine +
+      //          "?InputVariable <" + Ontology.Name + "> ?Name .",
+      //          0, 1000)
+      //        .Select(x => (Literal)x.Get("Name"))
+      //        .Select(l => (string)l.Value)
+      //        .Distinct();
+
+      //      List<int> inputVariables = new List<int>();
+      //      foreach (string variableName in inputVariableLiterals) {
+      //        int variableIndex = ds.Problem.Dataset.GetVariableIndex(variableName);
+      //        inputVariables.Add(variableIndex);
+      //      }
+      //      if (!AlgorithmFinishedOrDispatched(targetVariableIndex, inputVariables.ToArray(), algoName)) {
+      //        AddDispatchedRun(targetVariableIndex, inputVariables.ToArray(), algoName);
+      //      }
+      //    }
+      //  }
+      //}
+    }
+
+    private void SetProblemParameters(HeuristicLab.Modeling.IAlgorithm algo, Problem problem, int targetVariable, int[] inputVariables) {
       algo.Dataset = problem.Dataset;
       algo.TargetVariable = targetVariable;
Index: /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.DataAnalysis/3.2/Dataset.cs	(revision 2223)
@@ -111,4 +111,7 @@
 
     private string[] variableNames;
+    public IEnumerable<string> VariableNames {
+      get { return variableNames; }
+    }
 
     public Dataset() {
@@ -123,4 +126,6 @@
       fireChangeEvents = true;
     }
+
+    
 
     public string GetVariableName(int variableIndex) {
Index: /trunk/sources/HeuristicLab.DataAnalysis/3.2/DatasetView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataAnalysis/3.2/DatasetView.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.DataAnalysis/3.2/DatasetView.cs	(revision 2223)
@@ -37,15 +37,4 @@
       : base() {
       InitializeComponent();
-      DiscoveryService discovery = new DiscoveryService();
-      IDatasetManipulator[] manipuators = discovery.GetInstances<IDatasetManipulator>();
-      contextMenuStrip.Items.Add(new ToolStripSeparator());
-      foreach(IDatasetManipulator manipulator in manipuators) {
-        contextMenuStrip.Items.Add(new ToolStripButton(manipulator.Action,null , delegate(object source, EventArgs args) 
-          { 
-            manipulator.Execute(Dataset);
-            Refresh();
-          }));
-      }
-      
       // format all cells with the round-trip formatter to make sure that values that are exported and imported to
       // another C# app (HL2) have the same numeric value
@@ -60,4 +49,13 @@
       : this() {
       this.Dataset = dataset;
+      DiscoveryService discovery = new DiscoveryService();
+      IDatasetManipulator[] manipuators = discovery.GetInstances<IDatasetManipulator>();
+      contextMenuStrip.Items.Add(new ToolStripSeparator());
+      foreach (IDatasetManipulator manipulator in manipuators) {
+        contextMenuStrip.Items.Add(new ToolStripButton(manipulator.Action, null, delegate(object source, EventArgs args) {
+          manipulator.Execute(Dataset);
+          Refresh();
+        }));
+      }      
     }
 
Index: /trunk/sources/HeuristicLab.GP.Boolean/3.3/FunctionLibraryInjector.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.Boolean/3.3/FunctionLibraryInjector.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.Boolean/3.3/FunctionLibraryInjector.cs	(revision 2223)
@@ -28,5 +28,5 @@
 using HeuristicLab.DataAnalysis;
 using HeuristicLab.GP.Interfaces;
-using HeuristicLab.GP.SantaFe;
+using HeuristicLab.GP;
 
 namespace HeuristicLab.GP.Boolean {
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs	(revision 2223)
@@ -70,9 +70,13 @@
     }
 
+    private IModel model;
     public virtual IModel Model {
       get {
         if (!engine.Terminated) throw new InvalidOperationException("The algorithm is still running. Wait until the algorithm is terminated to retrieve the result.");
-        IScope bestModelScope = engine.GlobalScope.GetVariableValue<IScope>("BestValidationSolution", false);
-        return CreateGPModel(bestModelScope);
+        if (model == null) {
+          IScope bestModelScope = engine.GlobalScope.GetVariableValue<IScope>("BestValidationSolution", false);
+          model = CreateGPModel(bestModelScope);
+        }
+        return model;
       }
     }
@@ -434,4 +438,5 @@
         double impact = ((DoubleData)row[1]).Data;
         model.SetVariableEvaluationImpact(variableName, impact);
+        model.AddInputVariables(variableName);
       }
       foreach (ItemList row in qualityImpacts) {
@@ -439,4 +444,5 @@
         double impact = ((DoubleData)row[1]).Data;
         model.SetVariableQualityImpact(variableName, impact);
+        model.AddInputVariables(variableName);
       }
       Engine.GlobalScope.RemoveSubScope(bestModelScope);
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/FunctionLibraryInjector.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/FunctionLibraryInjector.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/FunctionLibraryInjector.cs	(revision 2223)
@@ -24,5 +24,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.GP.Interfaces;
-using HeuristicLab.GP.SantaFe;
+using HeuristicLab.GP;
 
 namespace HeuristicLab.GP.StructureIdentification {
Index: /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionLibraryInjectorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionLibraryInjectorBase.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionLibraryInjectorBase.cs	(revision 2223)
@@ -28,5 +28,5 @@
 using HeuristicLab.GP.Interfaces;
 
-namespace HeuristicLab.GP.SantaFe {
+namespace HeuristicLab.GP {
   public abstract class FunctionLibraryInjectorBase : OperatorBase {
     private const string FUNCTIONLIBRARY = "FunctionLibrary";
Index: /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs
===================================================================
--- /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs	(revision 2223)
@@ -293,4 +293,5 @@
         double impact = ((DoubleData)row[1]).Data;
         model.SetVariableEvaluationImpact(variableName, impact);
+        model.AddInputVariables(variableName);
       }
       foreach (ItemList row in qualityImpacts) {
@@ -298,4 +299,5 @@
         double impact = ((DoubleData)row[1]).Data;
         model.SetVariableQualityImpact(variableName, impact);
+        model.AddInputVariables(variableName);
       }
 
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Algorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Algorithm.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Algorithm.cs	(revision 2223)
@@ -0,0 +1,45 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.Text;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  [Table(Name = "Algorithm")]
+  public class Algorithm : IAlgorithm  {
+    public Algorithm() {
+    }
+
+    public Algorithm(string name)
+      : this() {
+      this.name = name;
+    }
+
+    public Algorithm(string name, string description)
+      : this(name) {
+      this.description = description;
+    }
+
+    private int id;
+    [Column(Storage = "id", IsPrimaryKey = true, IsDbGenerated = true)]
+    public int Id {
+      get { return this.id; }
+      private set { this.id = value; }
+    }
+
+    private string name;
+    [Column(Storage = "name", CanBeNull = false)]
+    public string Name {
+      get { return this.name; }
+      set { this.name = value; }
+    }
+
+    private string description;
+    [Column(Storage = "description", CanBeNull = true)]
+    public string Description {
+      get { return this.description; }
+      set { this.description = value; }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/InputVariable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/InputVariable.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/InputVariable.cs	(revision 2223)
@@ -0,0 +1,67 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.Text;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  [Table(Name = "InputVariable")]
+  public class InputVariable : IInputVariable {
+    public InputVariable() {
+      this.model = default(EntityRef<Model>);
+      this.variable = default(EntityRef<Variable>);
+    }
+
+    public InputVariable(Model model, Variable variable)
+      : base() {
+      this.modelId = model.Id;
+      this.variableId = variable.Id;
+    }
+
+    private int variableId;
+    [Column(Storage = "variableId", IsPrimaryKey = true)]
+    public int VariableId {
+      get { return this.variableId; }
+      private set {
+        if (variableId != value) {
+          if (variable.HasLoadedOrAssignedValue)
+            throw new ForeignKeyReferenceAlreadyHasValueException();
+          variableId = value;          
+        }
+      }
+    }
+
+    private EntityRef<Variable> variable;
+    [Association(Storage = "variable", ThisKey = "VariableId", OtherKey = "Id", IsForeignKey = true)]
+    public Variable Variable {
+      get { return variable.Entity; }
+    }
+
+    IVariable IInputVariable.Variable {
+      get { return this.Variable; }
+    }
+
+    private int modelId;
+    [Column(Storage = "modelId", IsPrimaryKey = true)]
+    public int ModelId {
+      get { return this.modelId; }
+      private set {
+        if (modelId != value) {
+          if (model.HasLoadedOrAssignedValue)
+            throw new ForeignKeyReferenceAlreadyHasValueException();
+          modelId = value;
+        }
+      }
+    }
+
+    private EntityRef<Model> model;
+    [Association(Storage = "model", ThisKey = "ModelId", OtherKey = "Id", IsForeignKey = true)]
+    public Model Model {
+      get { return model.Entity; }
+    }
+
+    IModel IInputVariable.Model {
+      get { return this.Model;}
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/InputVariableResult.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/InputVariableResult.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/InputVariableResult.cs	(revision 2223)
@@ -0,0 +1,100 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.Text;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  [Table(Name="InputVariableResult")]
+  public class InputVariableResult : IInputVariableResult {
+    public InputVariableResult() {
+      this.model = default(EntityRef<Model>);
+      this.variable = default(EntityRef<Variable>);
+      this.result = default(EntityRef<Result>);
+    }
+
+    public InputVariableResult(InputVariable inputVariable, Result result, double value)
+      : this() {
+      this.variableId = inputVariable.VariableId;
+      this.modelId = inputVariable.ModelId;
+      this.resultId = result.Id;
+      this.value = value;
+    }
+
+    private int variableId;
+    [Column(Storage = "variableId", IsPrimaryKey = true)]
+    public int VariableId {
+      get { return this.variableId; }
+      private set {
+        if (variableId != value) {
+          if (variable.HasLoadedOrAssignedValue)
+            throw new ForeignKeyReferenceAlreadyHasValueException();
+          variableId = value;
+        }
+      }
+    }
+
+    private EntityRef<Variable> variable;
+    [Association(Storage = "variable", ThisKey = "VariableId", OtherKey = "Id", IsForeignKey = true)]
+    public Variable Variable {
+      get { return variable.Entity; }
+    }
+
+    IVariable IInputVariableResult.Variable {
+      get { return this.Variable; }
+    }
+
+    private int modelId;
+    [Column(Storage = "modelId", IsPrimaryKey = true)]
+    public int ModelId {
+      get { return this.modelId; }
+      private set {
+        if (modelId != value) {
+          if (model.HasLoadedOrAssignedValue)
+            throw new ForeignKeyReferenceAlreadyHasValueException();
+          modelId = value;
+        }
+      }
+    }
+
+    private EntityRef<Model> model;
+    [Association(Storage = "model", ThisKey = "ModelId", OtherKey = "Id", IsForeignKey = true)]
+    public Model Model {
+      get { return model.Entity; }
+    }
+
+    IModel IInputVariableResult.Model {
+      get { return this.Model; }
+    }
+
+    private int resultId;
+    [Column(Storage = "resultId", IsPrimaryKey = true)]
+    public int ResultId {
+      get { return this.resultId; }
+      private set {
+        if (resultId != value) {
+          if (result.HasLoadedOrAssignedValue)
+            throw new ForeignKeyReferenceAlreadyHasValueException();
+          resultId = value;
+        }
+      }
+    }
+
+    private EntityRef<Result> result;
+    [Association(Storage = "result", ThisKey = "ResultId", OtherKey = "Id", IsForeignKey = true)]
+    public Result Result {
+      get { return result.Entity; }
+    }
+
+    IResult IInputVariableResult.Result {
+      get { return this.Result; }
+    }
+
+    private double value;
+    [Column(Storage = "value", CanBeNull = false)]
+    public double Value {
+      get { return this.value; }
+      set { this.value = value; }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Model.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Model.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Model.cs	(revision 2223)
@@ -0,0 +1,141 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.Text;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  [Table(Name = "Model")]
+  public class Model : IModel {
+    public Model() {
+      targetVariable = default(EntityRef<Variable>);
+      algorithm = default(EntityRef<Algorithm>);
+    }
+
+    public Model(Variable targetVariable, Algorithm algorithm)
+      : this() {
+      this.targetVariableId = targetVariable.Id;
+      this.algorithmId = algorithm.Id;
+    }
+
+    private int id;
+    [Column(Storage = "id", IsPrimaryKey = true, IsDbGenerated = true)]
+    public int Id {
+      get { return this.id; }
+      private set { this.id = value; }
+    }
+
+    private int algorithmId;
+    [Column(Storage = "algorithmId", CanBeNull = false)]
+    public int AlgorithmId {
+      get { return this.algorithmId; }
+      private set {
+        if (algorithmId != value) {
+          if (algorithm.HasLoadedOrAssignedValue)
+            throw new ForeignKeyReferenceAlreadyHasValueException();
+          algorithmId = value;
+        }
+      }
+    }
+
+    private EntityRef<Algorithm> algorithm;
+    [Association(Storage = "algorithm", ThisKey = "AlgorithmId", OtherKey = "Id", IsForeignKey = true)]
+    public Algorithm Algorithm {
+      get { return this.algorithm.Entity; }
+      //private set {
+      //  Algorithm previousValue = algorithm.Entity;
+      //  if (previousValue != value || (!algorithm.HasLoadedOrAssignedValue)) {
+      //    if (previousValue != null) {
+      //      algorithm.Entity = null;
+      //    }
+      //    algorithm.Entity = value;
+      //    if (value != null) {
+      //      algorithmId = value.Id;
+      //    }
+      //  }
+      //}
+    }
+
+    IAlgorithm IModel.Algorithm {
+      get { return this.Algorithm; }
+    }
+
+    private int targetVariableId;
+    [Column(Storage = "targetVariableId", CanBeNull = false)]
+    public int TargetVariableId {
+      get { return this.targetVariableId; }
+      private set {
+        if (targetVariableId != value) {
+          if (targetVariable.HasLoadedOrAssignedValue)
+            throw new ForeignKeyReferenceAlreadyHasValueException();
+          targetVariableId = value;
+        }
+      }
+    }
+
+    private EntityRef<Variable> targetVariable;
+    [Association(Storage = "targetVariable", ThisKey = "TargetVariableId", OtherKey = "Id", IsForeignKey = true)]
+    public Variable TargetVariable {
+      get { return this.targetVariable.Entity; }
+      //private set {
+      //  Variable previousValue = targetVariable.Entity;
+      //  if (previousValue != value || (!targetVariable.HasLoadedOrAssignedValue)) {
+      //    if (previousValue != null) {
+      //      targetVariable.Entity = null;
+      //    }
+      //    targetVariable.Entity = value;
+      //    if (value != null) {
+      //      targetVariableId = value.Id;
+      //    }
+      //  }
+      //}
+    }
+
+    IVariable IModel.TargetVariable {
+      get { return this.TargetVariable; }
+    }
+
+    private int trainingSamplesStart;
+    [Column(Storage = "trainingSamplesStart", CanBeNull = false)]
+    public int TrainingSamplesStart {
+      get { return this.trainingSamplesStart; }
+      set { this.trainingSamplesStart = value; }
+    }
+
+    private int trainingSamplesEnd;
+    [Column(Storage = "trainingSamplesEnd", CanBeNull = false)]
+    public int TrainingSamplesEnd {
+      get { return this.trainingSamplesEnd; }
+      set { this.trainingSamplesEnd = value; }
+    }
+
+    private int validationSamplesStart;
+    [Column(Storage = "validationSamplesStart", CanBeNull = false)]
+    public int ValidationSamplesStart {
+      get { return this.validationSamplesStart; }
+      set { this.validationSamplesStart = value; }
+    }
+
+    private int validationSamplesEnd;
+    [Column(Storage = "validationSamplesEnd", CanBeNull = false)]
+    public int ValidationSamplesEnd {
+      get { return this.validationSamplesEnd; }
+      set { this.validationSamplesEnd = value; }
+    }
+
+    private int testSamplesStart;
+    [Column(Storage = "testSamplesStart", CanBeNull = false)]
+    public int TestSamplesStart {
+      get { return this.testSamplesStart; }
+      set { this.testSamplesStart = value; }
+    }
+
+    private int testSamplesEnd;
+    [Column(Storage = "testSamplesEnd", CanBeNull = false)]
+    public int TestSamplesEnd {
+      get { return this.testSamplesEnd; }
+      set { this.testSamplesEnd = value; }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/ModelData.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/ModelData.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/ModelData.cs	(revision 2223)
@@ -0,0 +1,48 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.Text;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  [Table(Name = "ModelData")]
+  public class ModelData {
+
+    public ModelData() {
+      this.model = default(EntityRef<Model>);
+    }
+
+    public ModelData(Model model, byte[] data)
+      : base() {
+      this.modelId = model.Id;
+      this.data = data;
+    }
+
+
+    private int modelId;
+    [Column(Storage = "modelId", IsPrimaryKey = true)]
+    public int ModelId {
+      get { return this.modelId; }
+      private set {
+        if (modelId != value) {
+          if (model.HasLoadedOrAssignedValue)
+            throw new ForeignKeyReferenceAlreadyHasValueException();
+          modelId = value;
+        }
+      }
+    }
+
+    private EntityRef<Model> model;
+    [Association(Storage = "model", ThisKey = "ModelId", OtherKey = "Id", IsForeignKey = true)]
+    public Model Model {
+      get { return model.Entity; }
+    }
+
+    private byte[] data;
+    [Column(Storage = "data", DbType = "image", CanBeNull = false)]
+    public byte[] Data {
+      get { return this.data; }
+      private set { this.data = value; }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/ModelResult.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/ModelResult.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/ModelResult.cs	(revision 2223)
@@ -0,0 +1,100 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.Text;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  [Table(Name = "ModelResult")]
+  public class ModelResult : IModelResult {
+    public ModelResult() {
+      this.model = default(EntityRef<Model>);
+      this.result = default(EntityRef<Result>);
+    }
+
+    public ModelResult(Model model, Result result, double value)
+      : this() {
+      this.modelId = model.Id;
+      this.resultId = result.Id;
+      this.value = value;
+    }
+
+    private double value;
+    [Column(Storage = "value", CanBeNull = false)]
+    public double Value {
+      get { return this.value; }
+      set { this.value = value; }
+    }
+
+    private int modelId;
+    [Column(Storage = "modelId",IsPrimaryKey = true, CanBeNull = false)]
+    public int ModelId {
+      get { return this.modelId; }
+      private set {
+        if (modelId != value) {
+          if (model.HasLoadedOrAssignedValue)
+            throw new ForeignKeyReferenceAlreadyHasValueException();
+        }
+        modelId = value;
+      }
+    }
+
+    private EntityRef<Model> model;
+    [Association(Storage = "model", ThisKey = "ModelId", OtherKey = "Id", IsForeignKey = true)]
+    public Model Model {
+      get { return this.model.Entity; }
+      //set {
+      //  Model previousValue = model.Entity;
+      //  if (previousValue != value || (!model.HasLoadedOrAssignedValue)) {
+      //    if (previousValue != null) {
+      //      model.Entity = null;
+      //    }
+      //    model.Entity = value;
+      //    if (value != null) {
+      //      modelId = value.Id;
+      //    } 
+      //  }
+      //}
+    }
+
+    IModel IModelResult.Model {
+      get { return this.Model; }
+    }
+
+    private int resultId;
+    [Column(Storage = "resultId",IsPrimaryKey = true, CanBeNull = false)]
+    public int ResultId {
+      get { return this.resultId; }
+      private set {
+        if (resultId != value) {
+          if (result.HasLoadedOrAssignedValue)
+            throw new ForeignKeyReferenceAlreadyHasValueException();
+        }
+        modelId = value;
+      }
+    }
+
+    private EntityRef<Result> result;
+    [Association(Storage = "result", ThisKey = "ResultId", OtherKey = "Id", IsForeignKey = true)]
+    public Result Result {
+      get { return this.result.Entity; }
+      //set {
+      //  Result previousValue = result.Entity;
+      //  if (previousValue != value || (!model.HasLoadedOrAssignedValue)) {
+      //    if (previousValue != null) {
+      //      result.Entity = null;
+      //    }
+      //    result.Entity = value;
+      //    if (value != null) {
+      //      resultId = value.Id;
+      //    }
+      //  }
+      //}
+    }
+
+    IResult IModelResult.Result {
+      get { return this.Result; }
+    }
+
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Problem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Problem.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Problem.cs	(revision 2223)
@@ -0,0 +1,40 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.Text;
+
+using HeuristicLab.DataAnalysis;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  [Table(Name = "Problem")]
+  public class Problem : IProblem {
+    public Problem() {
+    }
+
+    public Problem(Dataset dataset)
+      : this() {
+      this.Dataset = dataset;
+    }
+
+    private int id;
+    [Column(Storage = "id", IsPrimaryKey = true, IsDbGenerated = true)]
+    public int Id {
+      get { return this.id; }
+      private set { this.id = value; }
+    }
+
+    private byte[] data;
+    [Column(Storage = "data", DbType = "image", CanBeNull = false)]
+    public byte[] Data {
+      get { return this.data; }
+      private set { this.data = value; }
+    }
+
+    public Dataset Dataset {
+      get { return (Dataset)PersistenceManager.RestoreFromGZip(this.Data); }
+      set { this.Data = PersistenceManager.SaveToGZip(value); }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Result.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Result.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Result.cs	(revision 2223)
@@ -0,0 +1,33 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.Text;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  [Table(Name = "Result")]
+  public class Result : IResult {
+    public Result() {
+    }
+
+    public Result(string name)
+      : this() {
+      this.name = name;
+    }
+
+    private int id;
+    [Column(Storage = "id", IsPrimaryKey = true, IsDbGenerated = true)]
+    public int Id {
+      get { return this.id; }
+      private set { this.id = value; }
+    }
+
+    private string name;
+    [Column(Storage = "name", CanBeNull = false)]
+    public string Name {
+      get { return this.name; }
+      private set { this.name = value; }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Variable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Variable.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Variable.cs	(revision 2223)
@@ -0,0 +1,33 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.Text;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  [Table(Name = "Variable")]
+  public class Variable : IVariable{
+    public Variable() {
+    }
+
+    public Variable(string name)
+      : this() {
+      this.name = name;
+    }
+
+    private int id;
+    [Column(Storage = "id", IsPrimaryKey = true, IsDbGenerated = true)]
+    public int Id {
+      get { return this.id; }
+      private set { this.id = value; }
+    }
+
+    private string name;
+    [Column(Storage = "name", CanBeNull = false)]
+    public string Name {
+      get { return this.name; }
+      private set { this.name = value; }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs	(revision 2223)
@@ -0,0 +1,250 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Reflection;
+
+using HeuristicLab.Core;
+using HeuristicLab.DataAnalysis;
+using HeuristicLab.Data;
+using System.Data.Linq;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  public class DatabaseService : IModelingDatabase {
+
+    private readonly string connection;
+    public DatabaseService(string connection) {
+      this.connection = connection;
+      Connect();
+      if (!ctx.DatabaseExists())
+        ctx.CreateDatabase();
+    }
+
+    private void EmptyDatabase() {
+      ctx.DeleteDatabase();
+      ctx.CreateDatabase();
+    }
+
+    private ModelingDataContext ctx;
+    public void Connect() {
+      if (ctx != null)
+        return;
+
+      ctx = new ModelingDataContext(connection);
+      DataLoadOptions dlo = new DataLoadOptions();
+      dlo.LoadWith<ModelResult>(mr => mr.Result);
+      dlo.LoadWith<InputVariableResult>(ir => ir.Variable);
+      dlo.LoadWith<InputVariableResult>(ir => ir.Result);
+      dlo.LoadWith<Model>(m => m.TargetVariable);
+      ctx.LoadOptions = dlo;
+    }
+
+    public void Disconnect() {
+      if (ctx == null)
+        return;
+      ctx.Dispose();
+      ctx = null;
+    }
+
+    public void Persist(HeuristicLab.Modeling.IAlgorithm algorithm) {
+      int trainingSamplesStart = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TrainingSamplesStart", false)).Data;
+      int trainingSamplesEnd = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TrainingSamplesEnd", false)).Data;
+      int validationSamplesStart = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("ValidationSamplesStart", false)).Data;
+      int validationSamplesEnd = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("ValidationSamplesEnd", false)).Data;
+      int testSamplesStart = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TestSamplesStart", false)).Data;
+      int testSamplesEnd = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TestSamplesEnd", false)).Data;
+
+      GetOrCreateProblem(algorithm.Dataset);
+      Dictionary<string, Variable> variables = GetAllVariables();
+      Algorithm algo = GetOrCreateAlgorithm(algorithm.Name, algorithm.Description);
+      Variable target = variables[algorithm.Model.TargetVariable];
+      Model model;
+
+      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
+        model = new Model(target, algo);
+        model.TrainingSamplesStart = trainingSamplesStart;
+        model.TrainingSamplesEnd = trainingSamplesEnd;
+        model.ValidationSamplesStart = validationSamplesStart;
+        model.ValidationSamplesEnd = validationSamplesEnd;
+        model.TestSamplesStart = testSamplesStart;
+        model.TestSamplesEnd = testSamplesEnd;
+
+        ctx.Models.InsertOnSubmit(model);
+
+        ctx.SubmitChanges();
+      }
+
+      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
+        ctx.ModelData.InsertOnSubmit(new ModelData(model, PersistenceManager.SaveToGZip(algorithm.Model.Data)));
+      }
+
+      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
+        foreach (string inputVariable in algorithm.Model.InputVariables) {
+          ctx.InputVariables.InsertOnSubmit(new InputVariable(model, variables[inputVariable]));
+        }
+        ctx.SubmitChanges();
+      }
+
+      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
+        //get all double properties to save as modelResult
+        IEnumerable<PropertyInfo> modelResultInfos = algorithm.Model.GetType().GetProperties().Where(
+          info => info.PropertyType == typeof(double));
+        foreach (PropertyInfo modelResultInfo in modelResultInfos) {
+          Result result = GetOrCreateResult(modelResultInfo.Name);
+          double value = (double)modelResultInfo.GetValue(algorithm.Model, null);
+          ctx.ModelResults.InsertOnSubmit(new ModelResult(model, result, value));
+        }
+        ctx.SubmitChanges();
+      }
+
+      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
+        IEnumerable<MethodInfo> inputVariableResultInfos = algorithm.Model.GetType().GetMethods().Where(
+          info => info.GetParameters().Count() == 1 &&
+             info.GetParameters()[0].ParameterType == typeof(string) &&
+             info.GetParameters()[0].Name == "variableName" &&
+             info.ReturnParameter.ParameterType == typeof(double) &&
+             info.Name.StartsWith("Get"));
+        foreach (MethodInfo inputVariableResultInfo in inputVariableResultInfos) {
+          Result result = GetOrCreateResult(inputVariableResultInfo.Name.Substring(3));
+          foreach (InputVariable variable in ctx.InputVariables.Where(iv => iv.Model == model)) {
+            double value = (double)inputVariableResultInfo.Invoke(algorithm.Model, new object[] { variable.Variable.Name });
+            ctx.InputVariableResults.InsertOnSubmit(new InputVariableResult(variable, result, value));
+          }
+        }
+        ctx.SubmitChanges();
+      }
+
+    }
+
+    #region Problem
+
+    public Dataset GetDataset() {
+      if (ctx.Problems.Count() != 1)
+        throw new InvalidOperationException("Could not get dataset. No or more than one problems are persisted in the database.");
+
+      Problem problem = ctx.Problems.Single();
+      return problem.Dataset;
+
+    }
+
+    public Problem GetOrCreateProblem(Dataset dataset) {
+      Problem problem;
+      if (ctx.Problems.Count() == 0)
+        problem = PersistProblem(dataset);
+      else
+        problem = ctx.Problems.Single();
+      if (problem.Dataset.ToString() != dataset.ToString())
+        throw new InvalidOperationException("Could not persist dataset. The database already contains a different dataset.");
+      return problem;
+    }
+
+    private Problem PersistProblem(Dataset dataset) {
+      Problem problem;
+      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
+        if (ctx.Problems.Count() != 0)
+          throw new InvalidOperationException("Could not persist dataset. A dataset is already saved in the database.");
+        problem = new Problem(dataset);
+        ctx.Problems.InsertOnSubmit(problem);
+        foreach (string variable in dataset.VariableNames) {
+          ctx.Variables.InsertOnSubmit(new Variable(variable));
+        }
+        ctx.SubmitChanges();
+      }
+      return problem;
+    }
+
+    #endregion
+
+    #region Algorithm
+    public Algorithm GetOrCreateAlgorithm(string name, string description) {
+      Algorithm algorithm;
+      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
+        var algorithms = from algo in ctx.Algorithms
+                         where algo.Name == name && algo.Description == description
+                         select algo;
+        if (algorithms.Count() == 0) {
+          algorithm = new Algorithm(name, description);
+          ctx.Algorithms.InsertOnSubmit(algorithm);
+          ctx.SubmitChanges();
+        } else if (algorithms.Count() == 1)
+          algorithm = algorithms.Single();
+        else
+          throw new ArgumentException("Could not get Algorithm. More than one algorithm with the name " + name + " are saved in database.");
+      }
+      return algorithm;
+    }
+    #endregion
+
+    #region Variables
+    public Dictionary<string, Variable> GetAllVariables() {
+      Dictionary<string, Variable> dict = new Dictionary<string, Variable>();
+      dict = ctx.Variables.ToDictionary<Variable, string>(delegate(Variable v) { return v.Name; });
+      return dict;
+    }
+    #endregion
+
+    #region Result
+    public Result GetOrCreateResult(string name) {
+      Result result;
+      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
+        var results = from r in ctx.Results
+                      where r.Name == name
+                      select r;
+        if (results.Count() == 0) {
+          result = new Result(name);
+          ctx.Results.InsertOnSubmit(result);
+          ctx.SubmitChanges();
+        } else if (results.Count() == 1)
+          result = results.Single();
+        else
+          throw new ArgumentException("Could not get result. More than one result with the name " + name + " are saved in database.");
+      }
+      return result;
+    }
+
+    public IEnumerable<IResult> GetAllResults() {
+      return ctx.Results.ToList().Cast<IResult>();
+    }
+
+    public IEnumerable<IResult> GetAllResultsForInputVariables() {
+      return (from ir in ctx.InputVariableResults select ir.Result).Distinct().ToList().Cast<IResult>();
+    }
+
+    #endregion
+
+    #region ModelResult
+    public IEnumerable<IModelResult> GetModelResults(IModel model) {
+      var results = from result in ctx.ModelResults
+                    where result.Model == model
+                    select result;
+      return results.ToList().Cast<IModelResult>();
+    }
+    #endregion
+
+    #region InputVariableResults
+    public IEnumerable<IInputVariableResult> GetInputVariableResults(IModel model) {
+      var inputResults = from ir in ctx.InputVariableResults
+                         where ir.Model == model
+                         select ir;
+      return inputResults.ToList().Cast<IInputVariableResult>();
+    }
+
+    #endregion
+
+    #region Model
+    public IEnumerable<IModel> GetAllModels() {
+      return ctx.Models.ToList().Cast<IModel>();
+    }
+
+    public byte[] GetModelData(IModel model) {
+      var data = (from md in ctx.ModelData
+                  where md.Model == model
+                  select md);
+      if (data.Count() == 0)
+        return null;
+      return data.Single().Data;
+    }
+    #endregion
+
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/HeuristicLab.Modeling.Database.SQLServerCompact-3.2.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/HeuristicLab.Modeling.Database.SQLServerCompact-3.2.csproj	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/HeuristicLab.Modeling.Database.SQLServerCompact-3.2.csproj	(revision 2223)
@@ -0,0 +1,149 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Modeling.Database.SQLServerCompact</RootNamespace>
+    <AssemblyName>HeuristicLab.Modeling.Database.SQLServerCompact-3.2</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
+      <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
+      <Name>HeuristicLab.Core-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.DataAnalysis\3.2\HeuristicLab.DataAnalysis-3.2.csproj">
+      <Project>{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}</Project>
+      <Name>HeuristicLab.DataAnalysis-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.2\HeuristicLab.Data-3.2.csproj">
+      <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
+      <Name>HeuristicLab.Data-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Modeling.Database\3.2\HeuristicLab.Modeling.Database-3.2.csproj">
+      <Project>{E84E5717-79F8-498F-A5E0-A055C4EC086B}</Project>
+      <Name>HeuristicLab.Modeling.Database-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Modeling\3.2\HeuristicLab.Modeling-3.2.csproj">
+      <Project>{80F7FADA-549D-4151-8856-79B620A50DBA}</Project>
+      <Name>HeuristicLab.Modeling-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.SQLServerCompact\3.2\HeuristicLab.SQLServerCompact-3.2.csproj">
+      <Project>{31DD6385-7276-49ED-9533-823D4CDF3D2A}</Project>
+      <Name>HeuristicLab.SQLServerCompact-3.2</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="DatabaseService.cs" />
+    <Compile Include="DataObjects\Algorithm.cs" />
+    <Compile Include="DataObjects\InputVariable.cs" />
+    <Compile Include="DataObjects\InputVariableResult.cs" />
+    <Compile Include="DataObjects\Model.cs" />
+    <Compile Include="DataObjects\ModelData.cs" />
+    <Compile Include="HeuristicLabModelingDatabaseSQLServerCompactPlugin.cs" />
+    <Compile Include="ModelingDataContext.cs" />
+    <Compile Include="DataObjects\ModelResult.cs" />
+    <Compile Include="DataObjects\Problem.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="DataObjects\Result.cs" />
+    <Compile Include="DataObjects\Variable.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/HeuristicLabModelingDatabaseSQLServerCompactPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/HeuristicLabModelingDatabaseSQLServerCompactPlugin.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/HeuristicLabModelingDatabaseSQLServerCompactPlugin.cs	(revision 2223)
@@ -0,0 +1,38 @@
+﻿#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.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  [ClassInfo(Name = "HeuristicLab.Modeling.Database.SQLServerCompact-3.2")]
+  [PluginFile(Filename = "HeuristicLab.Modeling.Database.SQLServerCompact-3.2.dll", Filetype = PluginFileType.Assembly)]
+  [Dependency(Dependency = "HeuristicLab.Core-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Data-3.2")]
+  [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Modeling-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Modeling.Database-3.2")]
+  [Dependency(Dependency = "HeuristicLab.SQLServerCompact-3.2")]  
+  public class HeuristicLabModelingDatabaseSQLServerCompactPlugin : PluginBase {
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/ModelingDataContext.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/ModelingDataContext.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/ModelingDataContext.cs	(revision 2223)
@@ -0,0 +1,52 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Data.Linq;
+using System.Data.Linq.Mapping;
+using System.Data.Sql;
+using System.Text;
+
+namespace HeuristicLab.Modeling.Database.SQLServerCompact {
+  public class ModelingDataContext : DataContext{
+    public ModelingDataContext(string connection)
+      : base(connection) {
+    }
+
+    #region Tables
+    public Table<Algorithm> Algorithms {
+      get { return GetTable<Algorithm>(); }
+    }
+
+    public Table<Variable> Variables {
+      get { return GetTable<Variable>(); }
+    }
+
+    public Table<Problem> Problems {
+      get { return GetTable<Problem>(); }
+    }
+
+    public Table<Result> Results {
+      get { return GetTable<Result>(); }
+    }
+
+    public Table<Model> Models {
+      get { return GetTable<Model>(); }
+    }
+
+    public Table<ModelData> ModelData {
+      get { return GetTable<ModelData>(); }
+    }
+
+    public Table<InputVariableResult> InputVariableResults {
+      get { return GetTable<InputVariableResult>(); }
+    }
+
+    public Table<ModelResult> ModelResults {
+      get { return GetTable<ModelResult>(); }
+    }
+
+    public Table<InputVariable> InputVariables {
+      get { return GetTable<InputVariable>(); }
+    }
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/Properties/AssemblyInfo.frame
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/Properties/AssemblyInfo.frame	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/Properties/AssemblyInfo.frame	(revision 2223)
@@ -0,0 +1,58 @@
+#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.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using HeuristicLab.PluginInfrastructure;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Modeling.SQLServerCompactBackend")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2008 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("863021a4-3cde-48be-8af6-dac1077f5fb5")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyFileVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyBuildDate("$WCNOW$")]
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/HeuristicLab.Modeling.Database-3.2.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/HeuristicLab.Modeling.Database-3.2.csproj	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/HeuristicLab.Modeling.Database-3.2.csproj	(revision 2223)
@@ -0,0 +1,124 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{E84E5717-79F8-498F-A5E0-A055C4EC086B}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Modeling.Database</RootNamespace>
+    <AssemblyName>HeuristicLab.Modeling.Database-3.2</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="IInputVariableResult.cs" />
+    <Compile Include="IAlgorithm.cs" />
+    <Compile Include="IProblem.cs" />
+    <Compile Include="IVariable.cs" />
+    <Compile Include="IInputVariable.cs" />
+    <Compile Include="HeuristicLabModelingDatabasePlugin.cs" />
+    <Compile Include="IModel.cs" />
+    <Compile Include="IModelingDatabase.cs" />
+    <Compile Include="IModelResult.cs" />
+    <Compile Include="IResult.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Modeling\3.2\HeuristicLab.Modeling-3.2.csproj">
+      <Project>{80F7FADA-549D-4151-8856-79B620A50DBA}</Project>
+      <Name>HeuristicLab.Modeling-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/HeuristicLabModelingDatabasePlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/HeuristicLabModelingDatabasePlugin.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/HeuristicLabModelingDatabasePlugin.cs	(revision 2223)
@@ -0,0 +1,33 @@
+#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.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Modeling.Database {
+  [ClassInfo(Name = "HeuristicLab.Modeling.Database-3.2")]
+  [PluginFile(Filename = "HeuristicLab.Modeling.Database-3.2.dll", Filetype = PluginFileType.Assembly)]
+  [Dependency(Dependency = "HeuristicLab.Modeling-3.2")]
+  public class HeuristicLabModelingDatabasePlugin : PluginBase {
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/IAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/IAlgorithm.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/IAlgorithm.cs	(revision 2223)
@@ -0,0 +1,32 @@
+﻿#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.Modeling.Database {
+  public interface IAlgorithm {
+    string Name { get; }
+    string Description { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/IInputVariable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/IInputVariable.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/IInputVariable.cs	(revision 2223)
@@ -0,0 +1,32 @@
+﻿#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.Modeling.Database {
+  public interface IInputVariable {
+    IModel Model { get; }
+    IVariable Variable { get; }  
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/IInputVariableResult.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/IInputVariableResult.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/IInputVariableResult.cs	(revision 2223)
@@ -0,0 +1,34 @@
+﻿#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.Modeling.Database {
+  public interface IInputVariableResult {
+    IModel Model { get; }
+    IVariable Variable { get; }
+    IResult Result { get; }
+    double Value { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/IModel.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/IModel.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/IModel.cs	(revision 2223)
@@ -0,0 +1,38 @@
+﻿#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.Modeling.Database {
+  public interface IModel {
+    IVariable TargetVariable { get; }
+    IAlgorithm Algorithm { get; }
+    int TrainingSamplesStart { get; }
+    int TrainingSamplesEnd { get; }
+    int ValidationSamplesStart { get; }
+    int ValidationSamplesEnd { get; }
+    int TestSamplesStart { get; }
+    int TestSamplesEnd { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/IModelResult.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/IModelResult.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/IModelResult.cs	(revision 2223)
@@ -0,0 +1,33 @@
+﻿#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.Modeling.Database {
+  public interface IModelResult {
+    IResult Result { get; }
+    IModel Model { get; }
+    double Value { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/IModelingDatabase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/IModelingDatabase.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/IModelingDatabase.cs	(revision 2223)
@@ -0,0 +1,40 @@
+﻿#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.Modeling.Database {
+  public interface IModelingDatabase {
+    void Persist(HeuristicLab.Modeling.IAlgorithm algorithm);
+    IEnumerable<IModel> GetAllModels();
+    IEnumerable<IResult> GetAllResults();
+    IEnumerable<IResult> GetAllResultsForInputVariables();
+    IEnumerable<IModelResult> GetModelResults(IModel model);
+    byte[] GetModelData(IModel model);
+    IEnumerable<IInputVariableResult> GetInputVariableResults(IModel model);
+
+    void Connect();
+    void Disconnect();
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/IProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/IProblem.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/IProblem.cs	(revision 2223)
@@ -0,0 +1,31 @@
+﻿#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.Modeling.Database {
+  public interface IProblem {
+    byte[] Data { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/IResult.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/IResult.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/IResult.cs	(revision 2223)
@@ -0,0 +1,31 @@
+﻿#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.Modeling.Database {
+  public interface IResult {
+    string Name { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/IVariable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/IVariable.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/IVariable.cs	(revision 2223)
@@ -0,0 +1,31 @@
+﻿#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.Modeling.Database {
+  public interface IVariable {
+    string Name { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Modeling.Database/3.2/Properties/AssemblyInfo.frame
===================================================================
--- /trunk/sources/HeuristicLab.Modeling.Database/3.2/Properties/AssemblyInfo.frame	(revision 2223)
+++ /trunk/sources/HeuristicLab.Modeling.Database/3.2/Properties/AssemblyInfo.frame	(revision 2223)
@@ -0,0 +1,58 @@
+#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.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using HeuristicLab.PluginInfrastructure;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Modeling.Database")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2008 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("863021a4-3cde-48be-8af6-dac1077f5fb5")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyFileVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyBuildDate("$WCNOW$")]
Index: /trunk/sources/HeuristicLab.Modeling/3.2/HeuristicLabModelingPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling/3.2/HeuristicLabModelingPlugin.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.Modeling/3.2/HeuristicLabModelingPlugin.cs	(revision 2223)
@@ -25,5 +25,5 @@
 using HeuristicLab.PluginInfrastructure;
 
-namespace HeuristicLab.GP.Modeling {
+namespace HeuristicLab.Modeling {
   [ClassInfo(Name = "HeuristicLab.Modeling-3.2")]
   [PluginFile(Filename = "HeuristicLab.Modeling-3.2.dll", Filetype = PluginFileType.Assembly)]
Index: /trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs	(revision 2223)
@@ -30,4 +30,5 @@
     Dataset Dataset { get; }
     string TargetVariable { get; }
+    IEnumerable<string> InputVariables { get; }
     double TrainingMeanSquaredError { get; }
     double ValidationMeanSquaredError { get; }
Index: /trunk/sources/HeuristicLab.Modeling/3.2/Model.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling/3.2/Model.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.Modeling/3.2/Model.cs	(revision 2223)
@@ -40,4 +40,14 @@
       get { return targetVariable; }
       set { targetVariable = value; }
+    }
+
+    private List<string> inputVariables = new List<string>();
+    public IEnumerable<string> InputVariables {
+      get { return inputVariables; }
+    }
+
+    public void AddInputVariables(string variableName) {
+      if (!inputVariables.Contains(variableName))
+        inputVariables.Add(variableName);
     }
 
@@ -122,5 +132,5 @@
     public double GetVariableQualityImpact(string variableName) {
       if (variableQualityImpacts.ContainsKey(variableName)) return variableQualityImpacts[variableName];
-      else throw new ArgumentException("Impact of variable "+variableName+" is not available.");
+      else throw new ArgumentException("Impact of variable " + variableName + " is not available.");
     }
 
Index: /trunk/sources/HeuristicLab.SQLServerCompact/3.2/HeuristicLab.SQLServerCompact-3.2.csproj
===================================================================
--- /trunk/sources/HeuristicLab.SQLServerCompact/3.2/HeuristicLab.SQLServerCompact-3.2.csproj	(revision 2223)
+++ /trunk/sources/HeuristicLab.SQLServerCompact/3.2/HeuristicLab.SQLServerCompact-3.2.csproj	(revision 2223)
@@ -0,0 +1,130 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{31DD6385-7276-49ED-9533-823D4CDF3D2A}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.SQLServerCompact</RootNamespace>
+    <AssemblyName>HeuristicLab.SQLServerCompact-3.2</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="HeuristicLabSQLServerCompactPlugin.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="System.Data.SqlServerCe.dll">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="x64\sqlceca35.dll" />
+    <Content Include="x64\sqlcecompact35.dll" />
+    <Content Include="x64\sqlceer35EN.dll" />
+    <Content Include="x64\sqlceme35.dll" />
+    <Content Include="x64\sqlceoledb35.dll" />
+    <Content Include="x64\sqlceqp35.dll" />
+    <Content Include="x64\sqlcese35.dll" />
+    <Content Include="x86\sqlceca35.dll" />
+    <Content Include="x86\sqlcecompact35.dll" />
+    <Content Include="x86\sqlceer35EN.dll" />
+    <Content Include="x86\sqlceme35.dll" />
+    <Content Include="x86\sqlceoledb35.dll" />
+    <Content Include="x86\sqlceqp35.dll" />
+    <Content Include="x86\sqlcese35.dll" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /trunk/sources/HeuristicLab.SQLServerCompact/3.2/HeuristicLabSQLServerCompactPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.SQLServerCompact/3.2/HeuristicLabSQLServerCompactPlugin.cs	(revision 2223)
+++ /trunk/sources/HeuristicLab.SQLServerCompact/3.2/HeuristicLabSQLServerCompactPlugin.cs	(revision 2223)
@@ -0,0 +1,14 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.SQLServerCompact {
+  [ClassInfo(Name = "HeuristicLab.SQLServerCompact-3.2")]
+  [PluginFile(Filename = "HeuristicLab.SQLServerCompact-3.2.dll", Filetype = PluginFileType.Assembly)]
+  [PluginFile(Filename = "System.Data.SqlServerCe.dll", Filetype = PluginFileType.Assembly)] 
+  public class HeuristicLabSQLServerCompactPlugin : PluginBase {
+  }
+}
Index: /trunk/sources/HeuristicLab.SQLServerCompact/3.2/Properties/AssemblyInfo.frame
===================================================================
--- /trunk/sources/HeuristicLab.SQLServerCompact/3.2/Properties/AssemblyInfo.frame	(revision 2223)
+++ /trunk/sources/HeuristicLab.SQLServerCompact/3.2/Properties/AssemblyInfo.frame	(revision 2223)
@@ -0,0 +1,38 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using HeuristicLab.PluginInfrastructure;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.SQLServerCompact")]
+[assembly: AssemblyDescription("Provides an interface to create and access local SQLServer Compact databases")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2008 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("3f5083f8-2738-4573-b230-e9928ef61e6b")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyFileVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyBuildDate("$WCNOW$")]
Index: /trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs
===================================================================
--- /trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs	(revision 2222)
+++ /trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs	(revision 2223)
@@ -446,4 +446,5 @@
         double impact = ((DoubleData)row[1]).Data;
         model.SetVariableEvaluationImpact(variableName, impact);
+        model.AddInputVariables(variableName);
       }
       foreach (ItemList row in qualityImpacts) {
@@ -451,4 +452,5 @@
         double impact = ((DoubleData)row[1]).Data;
         model.SetVariableQualityImpact(variableName, impact);
+        model.AddInputVariables(variableName);
       }
 
Index: /trunk/sources/HeuristicLab.sln
===================================================================
--- /trunk/sources/HeuristicLab.sln	(revision 2222)
+++ /trunk/sources/HeuristicLab.sln	(revision 2223)
@@ -235,4 +235,10 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.LinearRegression-3.2", "HeuristicLab.LinearRegression\3.2\HeuristicLab.LinearRegression-3.2.csproj", "{B9A64475-D542-47CF-9688-735F6224F055}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Modeling.Database-3.2", "HeuristicLab.Modeling.Database\3.2\HeuristicLab.Modeling.Database-3.2.csproj", "{E84E5717-79F8-498F-A5E0-A055C4EC086B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Modeling.Database.SQLServerCompact-3.2", "HeuristicLab.Modeling.Database.SQLServerCompact\3.2\HeuristicLab.Modeling.Database.SQLServerCompact-3.2.csproj", "{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.SQLServerCompact-3.2", "HeuristicLab.SQLServerCompact\3.2\HeuristicLab.SQLServerCompact-3.2.csproj", "{31DD6385-7276-49ED-9533-823D4CDF3D2A}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.GP.Interfaces-3.3", "HeuristicLab.GP.Interfaces\3.3\HeuristicLab.GP.Interfaces-3.3.csproj", "{924B6BEA-9A99-40FE-9334-5C01E8D540EC}"
@@ -3774,4 +3780,104 @@
 		{B9A64475-D542-47CF-9688-735F6224F055}.Visualization Debug|x86.ActiveCfg = Debug|x86
 		{B9A64475-D542-47CF-9688-735F6224F055}.Visualization Debug|x86.Build.0 = Debug|x86
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.CEDMA Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.CEDMA Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.CEDMA Debug|x64.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.CEDMA Debug|x86.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Debug|x64.ActiveCfg = Debug|x64
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Debug|x64.Build.0 = Debug|x64
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Debug|x86.ActiveCfg = Debug|x86
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Debug|x86.Build.0 = Debug|x86
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Modeling Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Modeling Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Modeling Debug|x64.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Modeling Debug|x86.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Release|x64.ActiveCfg = Release|x64
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Release|x64.Build.0 = Release|x64
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Release|x86.ActiveCfg = Release|x86
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Release|x86.Build.0 = Release|x86
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.v3.2 Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.v3.2 Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.v3.2 Debug|x64.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.v3.2 Debug|x86.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Visualization Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Visualization Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Visualization Debug|x64.ActiveCfg = Debug|Any CPU
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B}.Visualization Debug|x86.ActiveCfg = Debug|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.CEDMA Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.CEDMA Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.CEDMA Debug|x64.ActiveCfg = Debug|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.CEDMA Debug|x64.Build.0 = Debug|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.CEDMA Debug|x86.ActiveCfg = Debug|x86
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.CEDMA Debug|x86.Build.0 = Debug|x86
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Debug|x64.ActiveCfg = Debug|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Debug|x64.Build.0 = Debug|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Debug|x86.ActiveCfg = Debug|x86
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Debug|x86.Build.0 = Debug|x86
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Modeling Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Modeling Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Modeling Debug|x64.ActiveCfg = Debug|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Modeling Debug|x64.Build.0 = Debug|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Modeling Debug|x86.ActiveCfg = Debug|x86
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Modeling Debug|x86.Build.0 = Debug|x86
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Release|Any CPU.Build.0 = Release|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Release|x64.ActiveCfg = Release|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Release|x64.Build.0 = Release|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Release|x86.ActiveCfg = Release|x86
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Release|x86.Build.0 = Release|x86
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.v3.2 Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.v3.2 Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.v3.2 Debug|x64.ActiveCfg = Debug|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.v3.2 Debug|x64.Build.0 = Debug|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.v3.2 Debug|x86.ActiveCfg = Debug|x86
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.v3.2 Debug|x86.Build.0 = Debug|x86
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Visualization Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Visualization Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Visualization Debug|x64.ActiveCfg = Debug|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Visualization Debug|x64.Build.0 = Debug|x64
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Visualization Debug|x86.ActiveCfg = Debug|x86
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Visualization Debug|x86.Build.0 = Debug|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|Any CPU.Build.0 = Debug|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|x64.ActiveCfg = Debug|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|x64.Build.0 = Debug|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|x86.ActiveCfg = Debug|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|x86.Build.0 = Debug|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|x64.ActiveCfg = Debug|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|x64.Build.0 = Debug|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|x86.ActiveCfg = Debug|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|x86.Build.0 = Debug|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|Any CPU.Build.0 = Debug|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|x64.ActiveCfg = Debug|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|x64.Build.0 = Debug|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|x86.ActiveCfg = Debug|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|x86.Build.0 = Debug|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|x64.ActiveCfg = Release|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|x64.Build.0 = Release|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|x86.ActiveCfg = Release|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|x86.Build.0 = Release|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|Any CPU.Build.0 = Debug|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|x64.ActiveCfg = Debug|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|x64.Build.0 = Debug|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|x86.ActiveCfg = Debug|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|x86.Build.0 = Debug|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|Any CPU.Build.0 = Debug|Any CPU
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|x64.ActiveCfg = Debug|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|x64.Build.0 = Debug|x64
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|x86.ActiveCfg = Debug|x86
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|x86.Build.0 = Debug|x86
 		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.CEDMA Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{924B6BEA-9A99-40FE-9334-5C01E8D540EC}.CEDMA Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -3928,4 +4034,7 @@
 		{C75532C4-765B-418E-B09B-46D36B2ABDB1} = {410732DB-725A-4824-896B-C298978343C0}
 		{B9A64475-D542-47CF-9688-735F6224F055} = {410732DB-725A-4824-896B-C298978343C0}
+		{E84E5717-79F8-498F-A5E0-A055C4EC086B} = {410732DB-725A-4824-896B-C298978343C0}
+		{EC1AA756-D612-4FA6-AA52-25CF4F8E3836} = {410732DB-725A-4824-896B-C298978343C0}
+		{31DD6385-7276-49ED-9533-823D4CDF3D2A} = {410732DB-725A-4824-896B-C298978343C0}
 		{924B6BEA-9A99-40FE-9334-5C01E8D540EC} = {410732DB-725A-4824-896B-C298978343C0}
 		{45D11FBD-A71B-48D3-8A94-8EB0DFE8E06A} = {410732DB-725A-4824-896B-C298978343C0}
Index: /trunk/sources/HeuristicLab/CopyAssemblies.cmd
===================================================================
--- /trunk/sources/HeuristicLab/CopyAssemblies.cmd	(revision 2222)
+++ /trunk/sources/HeuristicLab/CopyAssemblies.cmd	(revision 2223)
@@ -77,4 +77,6 @@
 copy "%SolutionDir%\HeuristicLab.Modeling\3.2\%Outdir%\HeuristicLab.Modeling-3.2.dll" .\plugins
 copy "%SolutionDir%\HeuristicLab.Modeling\3.3\%Outdir%\HeuristicLab.Modeling-3.3.dll" .\plugins
+copy "%SolutionDir%\HeuristicLab.Modeling.Database\3.2\%Outdir%\HeuristicLab.Modeling.Database-3.2.dll" .\plugins
+copy "%SolutionDir%\HeuristicLab.Modeling.Database.SQLServerCompact\3.2\%Outdir%\HeuristicLab.Modeling.Database.SQLServerCompact-3.2.dll" .\plugins
 copy "%SolutionDir%\HeuristicLab.Operators\3.2\%Outdir%\HeuristicLab.Operators-3.2.dll" .\plugins
 copy "%SolutionDir%\HeuristicLab.Operators\3.3\%Outdir%\HeuristicLab.Operators-3.3.dll" .\plugins
@@ -110,4 +112,6 @@
 copy "%SolutionDir%\HeuristicLab.SQLite\3.2\SQLite License.txt" .\plugins
 copy "%SolutionDir%\HeuristicLab.SQLite\3.2\SQLite.NET.chm" .\plugins
+copy "%SolutionDir%\HeuristicLAb.SQLServerCompact\3.2\%Outdir%\HeuristicLab.SQLServerCompact-3.2.dll" .\plugins
+copy "%SolutionDir%\HeuristicLAb.SQLServerCompact\3.2\%Outdir%\System.Data.SqlServerCe.dll" .\plugins
 copy "%SolutionDir%\HeuristicLab.StatisticalAnalysis\3.2\%Outdir%\HeuristicLab.StatisticalAnalysis-3.2.dll" .\plugins
 copy "%SolutionDir%\HeuristicLab.SupportVectorMachines\3.2\%Outdir%\HeuristicLab.SupportVectorMachines-3.2.dll" .\plugins
@@ -132,11 +136,15 @@
 if "%Platform%" == "x86" (   
   copy /B /Y "%SolutionDir%\HeuristicLab.SQLite\3.2\System.Data.SQLite.dll" .\plugins
+  xcopy "%SolutionDir%\HeuristicLab.SQLServerCompact\3.2\x86\*" .\plugins /e /i
 ) else if "%Platform%" == "x64" ( 
   copy /B /Y "%SolutionDir%\HeuristicLab.SQLite\3.2\System.Data.SQLite.x64.dll" .\plugins\System.Data.SQLite.dll
+  xcopy "%SolutionDir%\HeuristicLab.SQLServerCompact\3.2\x64\*" .\plugins /e /i
 ) else if "%Platform%" == "AnyCPU" (
   if "%PROCESSOR_ARCHITECTURE%" == "x64" (
     copy /B /Y "%SolutionDir%\HeuristicLab.SQLite\3.2\System.Data.SQLite.x64.dll" .\plugins\System.Data.SQLite.dll
+     xcopy "%SolutionDir%\HeuristicLab.SQLServerCompact\3.2\x64\*" .\plugins /e /i
   ) else if "%PROCESSOR_ARCHITECTURE%" == "x86" (
     copy /B /Y "%SolutionDir%\HeuristicLab.SQLite\3.2\System.Data.SQLite.dll" .\plugins
+    xcopy "%SolutionDir%\HeuristicLab.SQLServerCompact\3.2\x86\*" .\plugins /e /i
   ) else (
     echo "ERROR: unknown architecture: "%PROCESSOR_ARCHITECTURE%"
Index: /trunk/sources/HeuristicLab/app.config
===================================================================
--- /trunk/sources/HeuristicLab/app.config	(revision 2222)
+++ /trunk/sources/HeuristicLab/app.config	(revision 2223)
@@ -15,5 +15,10 @@
       <remove invariant="System.Data.SQLite"/>
       <add name="SQLite Data Provider" invariant="System.Data.SQLite"
-           description=".Net Framework Data Provider for SQLite"           type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
+           description=".Net Framework Data Provider for SQLite"           
+           type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
+      <remove invariant="System.Data.SqlServerCe.3.5" />
+      <add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" 
+           description=".NET Framework Data Provider for Microsoft SQL Server Compact" 
+           type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
     </DbProviderFactories>
   </system.data>
