You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/11/22 16:24:44 UTC

git commit: simplifying data structures and reducing performance / GC impact for frequently-used data structures like nodes and triples (e.g. by avoiding creating first a new Date() and then immediately replacing it)

Updated Branches:
  refs/heads/develop 9ce52153d -> 101f41f1f


simplifying data structures and reducing performance / GC impact for frequently-used data structures like nodes and triples (e.g. by avoiding creating first a new Date() and then immediately replacing it)


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/101f41f1
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/101f41f1
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/101f41f1

Branch: refs/heads/develop
Commit: 101f41f1ffea821a5455656cb635e6d8687dc93a
Parents: 9ce5215
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Fri Nov 22 16:24:39 2013 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Fri Nov 22 16:24:39 2013 +0100

----------------------------------------------------------------------
 .../kiwi/loader/generic/KiWiHandler.java        | 26 +++++++++++-------
 .../persistence/h2/create_reasoner_tables.sql   |  3 ---
 .../persistence/h2/drop_reasoner_tables.sql     |  4 ---
 .../kiwi/persistence/h2/statements.properties   |  9 -------
 .../mysql/create_reasoner_tables.sql            | 13 ---------
 .../persistence/mysql/drop_reasoner_tables.sql  |  4 ---
 .../persistence/mysql/statements.properties     | 14 ----------
 .../pgsql/create_reasoner_tables.sql            |  3 ---
 .../persistence/pgsql/drop_reasoner_tables.sql  |  4 ---
 .../persistence/pgsql/statements.properties     |  9 -------
 .../kiwi/model/rdf/KiWiAnonResource.java        | 13 ++++++---
 .../kiwi/model/rdf/KiWiBooleanLiteral.java      |  8 ++++++
 .../kiwi/model/rdf/KiWiDateLiteral.java         |  5 ++++
 .../kiwi/model/rdf/KiWiDoubleLiteral.java       | 12 +++++++++
 .../marmotta/kiwi/model/rdf/KiWiIntLiteral.java |  8 ++++++
 .../marmotta/kiwi/model/rdf/KiWiLiteral.java    | 23 +++++++++++-----
 .../marmotta/kiwi/model/rdf/KiWiNode.java       |  6 ++++-
 .../marmotta/kiwi/model/rdf/KiWiResource.java   |  6 +++++
 .../kiwi/model/rdf/KiWiStringLiteral.java       | 17 ++++++++++++
 .../marmotta/kiwi/model/rdf/KiWiTriple.java     | 28 +++++++++++++-------
 .../kiwi/model/rdf/KiWiUriResource.java         | 12 ++++++---
 .../kiwi/persistence/KiWiConnection.java        | 25 +++++------------
 .../kiwi/persistence/h2/create_base_tables.sql  |  4 ---
 .../kiwi/persistence/h2/drop_base_tables.sql    |  4 ---
 .../kiwi/persistence/h2/statements.properties   |  7 -----
 .../persistence/mysql/create_base_tables.sql    | 13 ---------
 .../kiwi/persistence/mysql/drop_base_tables.sql |  4 ---
 .../persistence/mysql/statements.properties     | 13 ---------
 .../persistence/pgsql/create_base_tables.sql    |  4 ---
 .../kiwi/persistence/pgsql/drop_base_tables.sql |  4 ---
 .../persistence/pgsql/statements.properties     |  8 ------
 .../persistence/h2/create_versioning_tables.sql |  2 --
 .../persistence/h2/drop_versioning_tables.sql   |  2 --
 .../kiwi/persistence/h2/statements.properties   |  4 ---
 .../mysql/create_versioning_tables.sql          |  7 -----
 .../mysql/drop_versioning_tables.sql            |  1 -
 .../persistence/mysql/statements.properties     |  5 ----
 .../pgsql/create_versioning_tables.sql          |  2 --
 .../pgsql/drop_versioning_tables.sql            |  2 --
 .../persistence/pgsql/statements.properties     |  4 ---
 .../persistence/h2/create_ldcache_tables.sql    |  2 --
 .../kiwi/persistence/h2/drop_ldcache_tables.sql |  1 -
 .../kiwi/persistence/h2/statements.properties   |  4 ---
 .../persistence/mysql/create_ldcache_tables.sql |  3 ---
 .../persistence/mysql/drop_ldcache_tables.sql   |  1 -
 .../persistence/mysql/statements.properties     |  4 ---
 .../persistence/pgsql/create_ldcache_tables.sql |  2 --
 .../persistence/pgsql/drop_ldcache_tables.sql   |  2 --
 .../persistence/pgsql/statements.properties     |  4 ---
 49 files changed, 136 insertions(+), 229 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java b/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
index 46518fc..34ab27c 100644
--- a/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
+++ b/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
@@ -65,6 +65,10 @@ public class KiWiHandler implements RDFHandler {
 
     private Statistics statistics;
 
+
+    protected Date importDate;
+
+
     public KiWiHandler(KiWiStore store, KiWiLoaderConfiguration config) {
         this.config     = config;
         this.store      = store;
@@ -152,6 +156,8 @@ public class KiWiHandler implements RDFHandler {
         this.start = System.currentTimeMillis();
         this.previous = System.currentTimeMillis();
 
+        this.importDate = new Date(this.start);
+
         if(config.getContext() != null) {
             try {
                 this.overrideContext = (KiWiResource)convertNode(new URIImpl(config.getContext()));
@@ -210,7 +216,7 @@ public class KiWiHandler implements RDFHandler {
                 context = (KiWiResource)convertNode(st.getContext());
             }
 
-            KiWiTriple result = new KiWiTriple(subject,predicate,object,context);
+            KiWiTriple result = new KiWiTriple(subject,predicate,object,context, importDate);
             if(config.isStatementExistanceCheck()) {
                 result.setId(connection.getTripleId(subject, predicate, object, context, true));
             }
@@ -281,7 +287,7 @@ public class KiWiHandler implements RDFHandler {
                     result = connection.loadLiteral(sanitizeString(value.toString()), lang, rtype);
 
                     if(result == null) {
-                        result = new KiWiStringLiteral(sanitizeString(value.toString()), locale, rtype);
+                        result = new KiWiStringLiteral(sanitizeString(value.toString()), locale, rtype, importDate);
                     } else {
                         nodesLoaded++;
                     }
@@ -292,7 +298,7 @@ public class KiWiHandler implements RDFHandler {
                     result = connection.loadLiteral(dvalue);
 
                     if(result == null) {
-                        result= new KiWiDateLiteral(dvalue, rtype);
+                        result= new KiWiDateLiteral(dvalue, rtype, importDate);
                     } else {
                         nodesLoaded++;
                     }
@@ -302,7 +308,7 @@ public class KiWiHandler implements RDFHandler {
                     result = connection.loadLiteral(ivalue);
 
                     if(result == null) {
-                        result= new KiWiIntLiteral(ivalue, rtype);
+                        result= new KiWiIntLiteral(ivalue, rtype, importDate);
                     } else {
                         nodesLoaded++;
                     }
@@ -312,7 +318,7 @@ public class KiWiHandler implements RDFHandler {
                     result = connection.loadLiteral(dvalue);
 
                     if(result == null) {
-                        result= new KiWiDoubleLiteral(dvalue, rtype);
+                        result= new KiWiDoubleLiteral(dvalue, rtype, importDate);
                     } else {
                         nodesLoaded++;
                     }
@@ -322,7 +328,7 @@ public class KiWiHandler implements RDFHandler {
                     result = connection.loadLiteral(bvalue);
 
                     if(result == null) {
-                        result= new KiWiBooleanLiteral(bvalue, rtype);
+                        result= new KiWiBooleanLiteral(bvalue, rtype, importDate);
                     } else {
                         nodesLoaded++;
                     }
@@ -330,7 +336,7 @@ public class KiWiHandler implements RDFHandler {
                     result = connection.loadLiteral(sanitizeString(value.toString()), lang, rtype);
 
                     if(result == null) {
-                        result = new KiWiStringLiteral(sanitizeString(value.toString()), locale, rtype);
+                        result = new KiWiStringLiteral(sanitizeString(value.toString()), locale, rtype, importDate);
                     } else {
                         nodesLoaded++;
                     }
@@ -343,7 +349,7 @@ public class KiWiHandler implements RDFHandler {
                 result = connection.loadLiteral(sanitizeString(value.toString()), lang, mytype);
 
                 if(result == null) {
-                    result = new KiWiStringLiteral(sanitizeString(value.toString()), locale, mytype);
+                    result = new KiWiStringLiteral(sanitizeString(value.toString()), locale, mytype, importDate);
                 } else {
                     nodesLoaded++;
                 }
@@ -370,7 +376,7 @@ public class KiWiHandler implements RDFHandler {
             KiWiUriResource result = connection.loadUriResource(uri);
 
             if(result == null) {
-                result = new KiWiUriResource(uri);
+                result = new KiWiUriResource(uri, importDate);
 
                 storeNode(result);
 
@@ -395,7 +401,7 @@ public class KiWiHandler implements RDFHandler {
             KiWiAnonResource result = connection.loadAnonResource(nodeID);
 
             if(result == null) {
-                result = new KiWiAnonResource(nodeID);
+                result = new KiWiAnonResource(nodeID, importDate);
                 storeNode(result);
             } else {
                 nodesLoaded++;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_reasoner_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_reasoner_tables.sql b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_reasoner_tables.sql
index 169f101..1e3ffbc 100644
--- a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_reasoner_tables.sql
+++ b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_reasoner_tables.sql
@@ -12,9 +12,6 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
-CREATE SEQUENCE seq_programs;
-CREATE SEQUENCE seq_rules;
-CREATE SEQUENCE seq_justifications;
 
 -- a table for representing metadata about complete reasoner programs
 CREATE TABLE reasoner_programs (

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_reasoner_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_reasoner_tables.sql b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_reasoner_tables.sql
index 64ea8ab..63a8f2e 100644
--- a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_reasoner_tables.sql
+++ b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_reasoner_tables.sql
@@ -25,7 +25,3 @@ DROP TABLE IF EXISTS reasoner_program_rules;
 DROP TABLE IF EXISTS reasoner_rules;
 DROP TABLE IF EXISTS reasoner_program_namespaces;
 DROP TABLE IF EXISTS reasoner_programs;
-
-DROP SEQUENCE IF EXISTS seq_rules;
-DROP SEQUENCE IF EXISTS seq_justifications;
-DROP SEQUENCE IF EXISTS seq_programs;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
index 6a4c55c..cddeff9 100644
--- a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
+++ b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
@@ -16,15 +16,6 @@
 # limitations under the License.
 #
 
-# get sequence numbers
-seq.rules             = SELECT nextval('seq_rules')
-seq.rules.set         = ALTER SEQUENCE seq_rules RESTART WITH ?
-seq.programs          = SELECT nextval('seq_programs')
-seq.programs.set      = ALTER SEQUENCE seq_programs RESTART WITH ?
-seq.justifications    = SELECT nextval('seq_justifications')
-seq.justifications.set= ALTER SEQUENCE seq_justifications RESTART WITH ?
-
-
 # rules
 rules.insert          = INSERT INTO reasoner_rules (id,name,description,body,createdAt) VALUES (?,?,?,?,now())
 rules.load_by_id      = SELECT id, name, description, body, createdAt FROM reasoner_rules WHERE id = ?

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_reasoner_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_reasoner_tables.sql b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_reasoner_tables.sql
index 28c20d9..710208a 100644
--- a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_reasoner_tables.sql
+++ b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_reasoner_tables.sql
@@ -12,19 +12,6 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
-CREATE TABLE seq_programs (id BIGINT NOT NULL);
-INSERT INTO seq_programs(id) VALUES (0);
-
-CREATE TABLE seq_rules (id BIGINT NOT NULL);
-INSERT INTO seq_rules VALUES (0);
-
-CREATE TABLE seq_justifications (id BIGINT NOT NULL);
-INSERT INTO seq_justifications(id) VALUES (0);
-
--- Sequences in MySQL:
--- UPDATE sequence SET id=LAST_INSERT_ID(id+1);
--- SELECT LAST_INSERT_ID();
-
 
 -- a table for representing metadata about complete reasoner programs
 CREATE TABLE reasoner_programs (

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_reasoner_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_reasoner_tables.sql b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_reasoner_tables.sql
index 817fd23..e20c0b7 100644
--- a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_reasoner_tables.sql
+++ b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_reasoner_tables.sql
@@ -25,7 +25,3 @@ DROP TABLE IF EXISTS reasoner_program_rules;
 DROP TABLE IF EXISTS reasoner_rules;
 DROP TABLE IF EXISTS reasoner_program_namespaces;
 DROP TABLE IF EXISTS reasoner_programs;
-
-DROP TABLE IF EXISTS seq_rules;
-DROP TABLE IF EXISTS seq_justifications;
-DROP TABLE IF EXISTS seq_programs;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
index 499b934..cddeff9 100644
--- a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
+++ b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
@@ -16,20 +16,6 @@
 # limitations under the License.
 #
 
-# get sequence numbers
-seq.rules.prep         = UPDATE seq_rules SET id=LAST_INSERT_ID(id+1);
-seq.rules              = SELECT LAST_INSERT_ID();
-seq.rules.set          = UPDATE seq_rules SET id=?;
-
-seq.programs.prep      = UPDATE seq_programs SET id=LAST_INSERT_ID(id+1);
-seq.programs           = SELECT LAST_INSERT_ID();
-seq.programs.set       = UPDATE seq_programs SET id=?;
-
-seq.justifications.prep= UPDATE seq_justifications SET id=LAST_INSERT_ID(id+1);
-seq.justifications     = SELECT LAST_INSERT_ID();
-seq.justifications.set = UPDATE seq_justifications SET id=?;
-
-
 # rules
 rules.insert          = INSERT INTO reasoner_rules (id,name,description,body,createdAt) VALUES (?,?,?,?,now())
 rules.load_by_id      = SELECT id, name, description, body, createdAt FROM reasoner_rules WHERE id = ?

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_reasoner_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_reasoner_tables.sql b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_reasoner_tables.sql
index 768aa7b..dd9d935 100644
--- a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_reasoner_tables.sql
+++ b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_reasoner_tables.sql
@@ -12,9 +12,6 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
-CREATE SEQUENCE seq_programs;
-CREATE SEQUENCE seq_rules;
-CREATE SEQUENCE seq_justifications;
 
 -- a table for representing metadata about complete reasoner programs
 CREATE TABLE reasoner_programs (

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_reasoner_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_reasoner_tables.sql b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_reasoner_tables.sql
index 96cbf71..9f03893 100644
--- a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_reasoner_tables.sql
+++ b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_reasoner_tables.sql
@@ -25,7 +25,3 @@ DROP TABLE IF EXISTS reasoner_program_rules;
 DROP TABLE IF EXISTS reasoner_rules;
 DROP TABLE IF EXISTS reasoner_program_namespaces;
 DROP TABLE IF EXISTS reasoner_programs;
-
-DROP SEQUENCE IF EXISTS seq_rules;
-DROP SEQUENCE IF EXISTS seq_justifications;
-DROP SEQUENCE IF EXISTS seq_programs;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
index 2f3fa5c..047b2ec 100644
--- a/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
+++ b/libraries/kiwi/kiwi-reasoner/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
@@ -15,15 +15,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-
-# get sequence numbers
-seq.rules             = SELECT nextval('seq_rules')
-seq.rules.set         = SELECT setval('seq_rules',?);
-seq.programs          = SELECT nextval('seq_programs')
-seq.programs.set      = SELECT setval('seq_programs',?);
-seq.justifications    = SELECT nextval('seq_justifications')
-seq.justifications.set= SELECT setval('seq_justifications',?);
-
 # rules
 rules.insert          = INSERT INTO reasoner_rules (id,name,description,body,createdAt) VALUES (?,?,?,?,now())
 rules.load_by_id      = SELECT id, name, description, body, createdAt FROM reasoner_rules WHERE id = ?

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiAnonResource.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiAnonResource.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiAnonResource.java
index 64801be..1c303d3 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiAnonResource.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiAnonResource.java
@@ -17,11 +17,10 @@
  */
 package org.apache.marmotta.kiwi.model.rdf;
 
-import com.google.common.hash.HashCode;
-import com.google.common.hash.HashFunction;
-import com.google.common.hash.Hashing;
 import org.openrdf.model.BNode;
 
+import java.util.Date;
+
 /**
  * The KiWiAnonResaource represents the anonymous RDF resource.
  * 
@@ -39,9 +38,15 @@ public class KiWiAnonResource extends KiWiResource implements BNode {
     
     public KiWiAnonResource(String id) {
         super();
-        setAnonId(id);
+        this.anonId = id;
+    }
+
+    public KiWiAnonResource(String id, Date created) {
+        super(created);
+        this.anonId = id;
     }
 
+
     @Deprecated
     public String getAnonId() {
         return anonId;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiBooleanLiteral.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiBooleanLiteral.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiBooleanLiteral.java
index 0c16359..37e706f 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiBooleanLiteral.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiBooleanLiteral.java
@@ -17,6 +17,8 @@
  */
 package org.apache.marmotta.kiwi.model.rdf;
 
+import java.util.Date;
+
 /**
  * Add file description here!
  * <p/>
@@ -37,6 +39,12 @@ public class KiWiBooleanLiteral extends KiWiStringLiteral {
         setType(type);
     }
 
+    public KiWiBooleanLiteral(boolean value, KiWiUriResource type, Date created) {
+        super(created);
+        setValue(value);
+        setType(type);
+    }
+
     public boolean booleanValue() {
         return value;
     }

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiDateLiteral.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiDateLiteral.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiDateLiteral.java
index 8606bf6..c717f24 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiDateLiteral.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiDateLiteral.java
@@ -59,6 +59,11 @@ public class KiWiDateLiteral extends KiWiStringLiteral {
         setDateContent(dateContent);
     }
 
+    public KiWiDateLiteral(Date dateContent, KiWiUriResource type, Date created) {
+        super(DateUtils.getXMLCalendar(DateUtils.getDateWithoutFraction(dateContent)).toXMLFormat(),null,type, created);
+        setDateContent(dateContent);
+    }
+
 
     public Date getDateContent() {
         return new Date(dateContent.getTime());

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiDoubleLiteral.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiDoubleLiteral.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiDoubleLiteral.java
index f07029f..56968ba 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiDoubleLiteral.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiDoubleLiteral.java
@@ -17,6 +17,8 @@
  */
 package org.apache.marmotta.kiwi.model.rdf;
 
+import java.util.Date;
+
 /**
  * Add file description here!
  * <p/>
@@ -36,6 +38,10 @@ public class KiWiDoubleLiteral extends KiWiStringLiteral {
         super();
     }
 
+    protected KiWiDoubleLiteral(Date created) {
+        super(created);
+    }
+
 
 
     public KiWiDoubleLiteral(Double content, KiWiUriResource type) {
@@ -44,6 +50,12 @@ public class KiWiDoubleLiteral extends KiWiStringLiteral {
         setType(type);
      }
 
+    public KiWiDoubleLiteral(Double content, KiWiUriResource type, Date created) {
+        super(created);
+        setDoubleContent(content);
+        setType(type);
+    }
+
 
     public Double getDoubleContent() {
         return doubleContent;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiIntLiteral.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiIntLiteral.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiIntLiteral.java
index 9d63703..c62b1e2 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiIntLiteral.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiIntLiteral.java
@@ -17,6 +17,8 @@
  */
 package org.apache.marmotta.kiwi.model.rdf;
 
+import java.util.Date;
+
 /**
  * Add file description here!
  * <p/>
@@ -44,6 +46,12 @@ public class KiWiIntLiteral extends KiWiDoubleLiteral {
         setType(type);
     }
 
+    public KiWiIntLiteral(Long content, KiWiUriResource type, Date created) {
+        super(created);
+        setIntContent(content);
+        setType(type);
+    }
+
 
     public Long getIntContent() {
         return intContent;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiLiteral.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiLiteral.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiLiteral.java
index e96220e..b1d3d85 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiLiteral.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiLiteral.java
@@ -17,17 +17,17 @@
  */
 package org.apache.marmotta.kiwi.model.rdf;
 
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Locale;
-
-import javax.xml.datatype.XMLGregorianCalendar;
-
 import org.apache.marmotta.commons.sesame.model.Namespaces;
 import org.openrdf.model.Literal;
 import org.openrdf.model.URI;
 import org.openrdf.model.datatypes.XMLDatatypeUtil;
 
+import javax.xml.datatype.XMLGregorianCalendar;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Date;
+import java.util.Locale;
+
 /**
  * KiWiLiterals store literal information from the knowledge base. They directly
  * correspond to an RDF literal stored in Sesame. KiWiLiterals are
@@ -55,12 +55,23 @@ public abstract class KiWiLiteral extends KiWiNode implements Literal {
         super();
     }
 
+    protected KiWiLiteral(Date created) {
+        super(created);
+    }
+
+
     protected KiWiLiteral(Locale locale, KiWiUriResource type) {
         this();
         this.locale = locale;
         this.type = type;
     }
 
+    protected KiWiLiteral(Locale locale, KiWiUriResource type, Date created) {
+        super(created);
+        this.locale = locale;
+        this.type = type;
+    }
+
 
     /**
      * Return the content of the literal, using the parametrized Java type

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiNode.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiNode.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiNode.java
index 7081120..99049cb 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiNode.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiNode.java
@@ -69,7 +69,11 @@ public abstract class KiWiNode implements Value, Serializable {
     private boolean changed = false;
 
     protected KiWiNode() {
-        this.created   = new Date();
+        this(new Date());
+    }
+
+    protected KiWiNode(Date created) {
+        this.created   = created;
         this.deleted   = false;
         this.cached    = false;
     }

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiResource.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiResource.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiResource.java
index d489600..d6a5c67 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiResource.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiResource.java
@@ -19,6 +19,8 @@ package org.apache.marmotta.kiwi.model.rdf;
 
 import org.openrdf.model.Resource;
 
+import java.util.Date;
+
 /**
  * KiWiResources correspond to RDF resources. A KiWi resource is either an anonymous 
  * resource or a URIResource. A KiWiResource represents an RDF resource. However, there
@@ -60,6 +62,10 @@ public abstract class KiWiResource extends KiWiNode implements Resource {
         super();
     }
 
+    protected KiWiResource(Date created) {
+        super(created);
+    }
+
 
     /**
      * Return true if the node is a literal. Since all resources are not literals,

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiStringLiteral.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiStringLiteral.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiStringLiteral.java
index ce16058..5f2e3e6 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiStringLiteral.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiStringLiteral.java
@@ -17,6 +17,7 @@
  */
 package org.apache.marmotta.kiwi.model.rdf;
 
+import java.util.Date;
 import java.util.Locale;
 
 /**
@@ -35,17 +36,33 @@ public class KiWiStringLiteral extends KiWiLiteral {
         super();
     }
 
+    public KiWiStringLiteral(Date created) {
+        super(created);
+    }
+
+
     public KiWiStringLiteral(String content) {
         super(null, null);
         this.content = content;
     }
 
+    public KiWiStringLiteral(String content, Date created) {
+        super(null, null, created);
+        this.content = content;
+    }
+
 
     public KiWiStringLiteral(String content, Locale language, KiWiUriResource type) {
         super(language, type);
         this.content = content;
     }
 
+    public KiWiStringLiteral(String content, Locale language, KiWiUriResource type, Date created) {
+        super(language, type, created);
+        this.content = content;
+    }
+
+
     /**
      * Return the content of the literal, using the parametrized Java type
      * @return

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiTriple.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiTriple.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiTriple.java
index 2faf620..a6e5f58 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiTriple.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiTriple.java
@@ -78,29 +78,37 @@ public class KiWiTriple  implements Statement, Serializable {
 
 	
 	public KiWiTriple() {
-		this.created = new Date();
-		this.deleted = false;
+        this(new Date());
+	}
+
+    public KiWiTriple(Date created) {
+        this.created = created;
+        this.deleted = false;
         this.inferred = false;
         this.markedForReasoning = false;
         this.deletedAt = null;
-	}
-	
+    }
 
 
 	public KiWiTriple(KiWiResource subject, KiWiUriResource predicate, KiWiNode object, KiWiResource context) {
-		this();
-		this.subject = subject;
-		this.predicate = predicate;
-		this.object   = object;
+		this(subject, predicate, object, context, new Date());
+	}
+
+
+    public KiWiTriple(KiWiResource subject, KiWiUriResource predicate, KiWiNode object, KiWiResource context, Date created) {
+        this(created);
+        this.subject = subject;
+        this.predicate = predicate;
+        this.object   = object;
         this.context  = context;
         this.deletedAt = null;
 
         assert(subject  != null);
         assert(predicate != null);
         assert(object   != null);
-	}
+    }
 
-   /**
+    /**
      * Get the object of this extended triple.
      * @return
      */

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiUriResource.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiUriResource.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiUriResource.java
index 4709463..5ced319 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiUriResource.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiUriResource.java
@@ -17,13 +17,11 @@
  */
 package org.apache.marmotta.kiwi.model.rdf;
 
-import com.google.common.hash.HashCode;
-import com.google.common.hash.HashFunction;
-import com.google.common.hash.Hashing;
-
 import org.apache.marmotta.commons.sesame.model.URICommons;
 import org.openrdf.model.URI;
 
+import java.util.Date;
+
 /**
  * Add file description here!
  * <p/>
@@ -58,6 +56,12 @@ public class KiWiUriResource extends KiWiResource implements URI {
         this.uri = uri;
     }
 
+    public KiWiUriResource(String uri, Date created) {
+        super(created);
+        this.uri = uri;
+    }
+
+
     /**
      * @deprecated use {@link #stringValue()} instead.
      */

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
index c4661a7..0b3d0b7 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/persistence/KiWiConnection.java
@@ -1556,23 +1556,20 @@ public class KiWiConnection {
 
         String ntype = row.getString("ntype");
         if("uri".equals(ntype)) {
-            KiWiUriResource result = new KiWiUriResource(row.getString("svalue"));
+            KiWiUriResource result = new KiWiUriResource(row.getString("svalue"),new Date(row.getTimestamp("createdAt").getTime()));
             result.setId(id);
-            result.setCreated(new Date(row.getTimestamp("createdAt").getTime()));
 
             cacheNode(result);
             return result;
         } else if("bnode".equals(ntype)) {
-            KiWiAnonResource result = new KiWiAnonResource(row.getString("svalue"));
+            KiWiAnonResource result = new KiWiAnonResource(row.getString("svalue"), new Date(row.getTimestamp("createdAt").getTime()));
             result.setId(row.getLong("id"));
-            result.setCreated(new Date(row.getTimestamp("createdAt").getTime()));
 
             cacheNode(result);
             return result;
         } else if("string".equals(ntype)) {
-            final KiWiStringLiteral result = new KiWiStringLiteral(row.getString("svalue"));
+            final KiWiStringLiteral result = new KiWiStringLiteral(row.getString("svalue"), new Date(row.getTimestamp("createdAt").getTime()));
             result.setId(row.getLong("id"));
-            result.setCreated(new Date(row.getTimestamp("createdAt").getTime()));
 
             if(row.getString("lang") != null) {
                 result.setLocale(getLocale(row.getString("lang")));
@@ -1584,10 +1581,8 @@ public class KiWiConnection {
             cacheNode(result);
             return result;
         } else if("int".equals(ntype)) {
-            KiWiIntLiteral result = new KiWiIntLiteral();
+            KiWiIntLiteral result = new KiWiIntLiteral(row.getLong("ivalue"), null, new Date(row.getTimestamp("createdAt").getTime()));
             result.setId(row.getLong("id"));
-            result.setCreated(new Date(row.getTimestamp("createdAt").getTime()));
-            result.setIntContent(row.getLong("ivalue"));
             if(row.getLong("ltype") != 0) {
                 result.setType((KiWiUriResource) loadNodeById(row.getLong("ltype")));
             }
@@ -1595,10 +1590,8 @@ public class KiWiConnection {
             cacheNode(result);
             return result;
         } else if("double".equals(ntype)) {
-            KiWiDoubleLiteral result = new KiWiDoubleLiteral();
+            KiWiDoubleLiteral result = new KiWiDoubleLiteral(row.getDouble("dvalue"), null, new Date(row.getTimestamp("createdAt").getTime()));
             result.setId(row.getLong("id"));
-            result.setCreated(new Date(row.getTimestamp("createdAt").getTime()));
-            result.setDoubleContent(row.getDouble("dvalue"));
             if(row.getLong("ltype") != 0) {
                 result.setType((KiWiUriResource) loadNodeById(row.getLong("ltype")));
             }
@@ -1606,10 +1599,8 @@ public class KiWiConnection {
             cacheNode(result);
             return result;
         } else if("boolean".equals(ntype)) {
-            KiWiBooleanLiteral result = new KiWiBooleanLiteral();
+            KiWiBooleanLiteral result = new KiWiBooleanLiteral(row.getBoolean("bvalue"),null,new Date(row.getTimestamp("createdAt").getTime()));
             result.setId(row.getLong("id"));
-            result.setCreated(new Date(row.getTimestamp("createdAt").getTime()));
-            result.setValue(row.getBoolean("bvalue"));
 
             if(row.getLong("ltype") != 0) {
                 result.setType((KiWiUriResource) loadNodeById(row.getLong("ltype")));
@@ -1618,10 +1609,8 @@ public class KiWiConnection {
             cacheNode(result);
             return result;
         } else if("date".equals(ntype)) {
-            KiWiDateLiteral result = new KiWiDateLiteral();
+            KiWiDateLiteral result = new KiWiDateLiteral(new Date(row.getTimestamp("tvalue").getTime()), null, new Date(row.getTimestamp("createdAt").getTime()));
             result.setId(row.getLong("id"));
-            result.setCreated(new Date(row.getTimestamp("createdAt").getTime()));
-            result.setDateContent(new Date(row.getTimestamp("tvalue").getTime()));
 
             if(row.getLong("ltype") != 0) {
                 result.setType((KiWiUriResource) loadNodeById(row.getLong("ltype")));

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_base_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_base_tables.sql b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_base_tables.sql
index 3493187..6df21f1 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_base_tables.sql
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_base_tables.sql
@@ -13,10 +13,6 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 
-CREATE SEQUENCE seq_nodes;
-CREATE SEQUENCE seq_triples;
-CREATE SEQUENCE seq_namespaces;
-
 CREATE TABLE nodes (
   id        bigint     NOT NULL,
   ntype     char(8)    NOT NULL,

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_base_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_base_tables.sql b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_base_tables.sql
index 41ca5f7..8e9392e 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_base_tables.sql
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_base_tables.sql
@@ -29,8 +29,4 @@ DROP TABLE IF EXISTS namespaces;
 DROP TABLE IF EXISTS nodes;
 DROP TABLE IF EXISTS metadata;
 
-DROP SEQUENCE IF EXISTS seq_nodes;
-DROP SEQUENCE IF EXISTS seq_triples;
-DROP SEQUENCE IF EXISTS seq_namespaces;
-
 DROP ALL OBJECTS DELETE FILES;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
index 931b692..5308562 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
@@ -23,13 +23,6 @@ meta.insert            = INSERT INTO metadata(mkey,mvalue) VALUES(?,?);
 meta.update            = UPDATE metadata SET mvalue = ? WHERE mkey = ?;
 meta.get               = SELECT mvalue FROM metadata WHERE mkey = ?;
 
-# get sequence numbers
-seq.nodes              = SELECT nextval('seq_nodes')
-seq.nodes.set          = ALTER SEQUENCE seq_nodes RESTART WITH ?
-seq.triples            = SELECT nextval('seq_triples')
-seq.triples.set        = ALTER SEQUENCE seq_triples RESTART WITH ?
-seq.namespaces         = SELECT nextval('seq_namespaces')
-seq.namespaces.set     = ALTER SEQUENCE seq_namespaces RESTART WITH ?
 
 # load entities
 load.node_by_id        = SELECT id,ntype,svalue,ivalue,dvalue,tvalue,bvalue,lang,ltype,createdAt FROM nodes WHERE id = ?

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_base_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_base_tables.sql b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_base_tables.sql
index b4f3611..d12839b 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_base_tables.sql
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_base_tables.sql
@@ -12,19 +12,6 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
-CREATE TABLE seq_nodes (id BIGINT NOT NULL) ENGINE=InnoDB;
-INSERT INTO seq_nodes(id) VALUES (0);
-
-CREATE TABLE seq_triples (id BIGINT NOT NULL) ENGINE=InnoDB;
-INSERT INTO seq_triples VALUES (0);
-
-CREATE TABLE seq_namespaces (id BIGINT NOT NULL) ENGINE=InnoDB;
-INSERT INTO seq_namespaces(id) VALUES (0);
-
--- Sequences in MySQL:
--- UPDATE sequence SET id=LAST_INSERT_ID(id+1);
--- SELECT LAST_INSERT_ID();
-
 
 CREATE TABLE nodes (
   id        bigint     NOT NULL,

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_base_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_base_tables.sql b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_base_tables.sql
index 5a91f23..9602305 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_base_tables.sql
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_base_tables.sql
@@ -29,7 +29,3 @@ DROP TABLE IF EXISTS namespaces;
 DROP TABLE IF EXISTS nodes;
 DROP TABLE IF EXISTS metadata;
 
-DROP TABLE IF EXISTS seq_nodes;
-DROP TABLE IF EXISTS seq_triples;
-DROP TABLE IF EXISTS seq_namespaces;
-

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
index 277311b..249b29f 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
@@ -23,19 +23,6 @@ meta.insert            = INSERT INTO metadata(mkey,mvalue) VALUES(?,?);
 meta.update            = UPDATE metadata SET mvalue = ? WHERE mkey = ?;
 meta.get               = SELECT mvalue FROM metadata WHERE mkey = ?;
 
-# get sequence numbers
-seq.nodes.prep         = UPDATE seq_nodes SET id=LAST_INSERT_ID(id+1);
-seq.nodes              = SELECT LAST_INSERT_ID();
-seq.nodes.set          = UPDATE seq_nodes SET id=?;
-
-seq.triples.prep       = UPDATE seq_triples SET id=LAST_INSERT_ID(id+1);
-seq.triples            = SELECT LAST_INSERT_ID();
-seq.triples.set        = UPDATE seq_triples SET id=?;
-
-seq.namespaces.prep    = UPDATE seq_namespaces SET id=LAST_INSERT_ID(id+1);
-seq.namespaces         = SELECT LAST_INSERT_ID();
-seq.namespaces.set     = UPDATE seq_namespaces SET id=?;
-
 # load entities
 load.node_by_id        = SELECT id,ntype,svalue,ivalue,dvalue,tvalue,bvalue,lang,ltype,createdAt FROM nodes WHERE id = ?
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_base_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_base_tables.sql b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_base_tables.sql
index a57a297..a5bb2d9 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_base_tables.sql
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_base_tables.sql
@@ -12,10 +12,6 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
-CREATE SEQUENCE seq_nodes;
-CREATE SEQUENCE seq_triples;
-CREATE SEQUENCE seq_namespaces;
-
 CREATE TYPE nodetype AS ENUM ('uri','bnode','string','int','double','date','boolean');
 
 CREATE TABLE nodes (

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_base_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_base_tables.sql b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_base_tables.sql
index 5a34920..539d217 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_base_tables.sql
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_base_tables.sql
@@ -28,9 +28,5 @@ DROP TABLE IF EXISTS namespaces;
 DROP TABLE IF EXISTS nodes;
 DROP TABLE IF EXISTS metadata;
 
-DROP SEQUENCE IF EXISTS seq_nodes;
-DROP SEQUENCE IF EXISTS seq_triples;
-DROP SEQUENCE IF EXISTS seq_namespaces;
-
 DROP TYPE IF EXISTS nodetype;
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
index eb7dd04..8226684 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
+++ b/libraries/kiwi/kiwi-triplestore/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
@@ -23,14 +23,6 @@ meta.update            = UPDATE metadata SET mvalue = ? WHERE mkey = ?;
 meta.get               = SELECT mvalue FROM metadata WHERE mkey = ?;
 meta.version           = SELECT mvalue FROM metadata WHERE mkey = 'version';
 
-# get sequence numbers
-seq.nodes              = SELECT nextval('seq_nodes')
-seq.nodes.set          = SELECT setval('seq_nodes',?)
-seq.triples            = SELECT nextval('seq_triples')
-seq.triples.set        = SELECT setval('seq_triples',?)
-seq.namespaces         = SELECT nextval('seq_namespaces')
-seq.namespaces.set     = SELECT setval('seq_namespaces',?)
-
 # load entities
 load.node_by_id        = SELECT id,ntype,svalue,ivalue,dvalue,tvalue,bvalue,lang,ltype,createdAt FROM nodes WHERE id = ?
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_versioning_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_versioning_tables.sql b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_versioning_tables.sql
index 9d584f0..137ca4a 100644
--- a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_versioning_tables.sql
+++ b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_versioning_tables.sql
@@ -12,8 +12,6 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
-CREATE SEQUENCE seq_versions;
-
 CREATE TABLE versions (
   id        bigint     NOT NULL,
   creator   bigint     REFERENCES nodes(id),

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_versioning_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_versioning_tables.sql b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_versioning_tables.sql
index a3416ee..6362419 100644
--- a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_versioning_tables.sql
+++ b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_versioning_tables.sql
@@ -22,5 +22,3 @@ DROP INDEX IF EXISTS idx_versions_created;
 DROP TABLE IF EXISTS versions_added;
 DROP TABLE IF EXISTS versions_removed;
 DROP TABLE IF EXISTS versions;
-
-DROP SEQUENCE IF EXISTS seq_versions;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
index c48d5de..e0d9a71 100644
--- a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
+++ b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
@@ -16,10 +16,6 @@
 # limitations under the License.
 #
 
-# get sequence numbers
-seq.versions          = SELECT nextval('seq_versions')
-seq.versions.set      = ALTER SEQUENCE seq_versions RESTART WITH ?
-
 load.version_by_id    = SELECT id,creator,createdAt FROM versions WHERE id = ?
 load.version_between  = SELECT id,creator,createdAt FROM versions WHERE createdAt > ? AND createdAt <= ?  ORDER BY createdAt ASC
 load.versions         = SELECT id,creator,createdAt FROM versions ORDER BY createdAt ASC

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_versioning_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_versioning_tables.sql b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_versioning_tables.sql
index 80a4d82..5ae1016 100644
--- a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_versioning_tables.sql
+++ b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_versioning_tables.sql
@@ -12,13 +12,6 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
-CREATE TABLE seq_versions (id BIGINT NOT NULL);
-INSERT INTO seq_versions(id) VALUES (0);
-
--- Sequences in MySQL:
--- UPDATE sequence SET id=LAST_INSERT_ID(id+1);
--- SELECT LAST_INSERT_ID();
-
 
 CREATE TABLE versions (
   id        bigint     NOT NULL,

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_versioning_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_versioning_tables.sql b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_versioning_tables.sql
index c7b40cf..80d2abd 100644
--- a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_versioning_tables.sql
+++ b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_versioning_tables.sql
@@ -22,5 +22,4 @@ DROP INDEX idx_versions_created on versions;
 DROP TABLE IF EXISTS versions_added;
 DROP TABLE IF EXISTS versions_removed;
 DROP TABLE IF EXISTS versions;
-DROP TABLE IF EXISTS seq_versions;
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
index 47d7f6a..da7fa6b 100644
--- a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
+++ b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
@@ -16,11 +16,6 @@
 # limitations under the License.
 #
 
-# get sequence numbers
-seq.versions.prep     = UPDATE seq_versions SET id=LAST_INSERT_ID(id+1);
-seq.versions          = SELECT LAST_INSERT_ID();
-seq.versions.set      = UPDATE seq_versions SET id=?;
-
 load.version_by_id    = SELECT id,creator,createdAt FROM versions WHERE id = ?
 load.version_between  = SELECT id,creator,createdAt FROM versions WHERE createdAt > ? AND createdAt <= ? ORDER BY createdAt ASC
 load.versions         = SELECT id,creator,createdAt FROM versions ORDER BY createdAt ASC

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_versioning_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_versioning_tables.sql b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_versioning_tables.sql
index 69f65ec..433d8ee 100644
--- a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_versioning_tables.sql
+++ b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_versioning_tables.sql
@@ -12,8 +12,6 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
-CREATE SEQUENCE seq_versions;
-
 CREATE TABLE versions (
   id        bigint     NOT NULL,
   creator   bigint     REFERENCES nodes(id),

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_versioning_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_versioning_tables.sql b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_versioning_tables.sql
index 961b906..68ef79a 100644
--- a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_versioning_tables.sql
+++ b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_versioning_tables.sql
@@ -21,5 +21,3 @@ DROP INDEX idx_versions_created;
 DROP TABLE IF EXISTS versions_added;
 DROP TABLE IF EXISTS versions_removed;
 DROP TABLE IF EXISTS versions;
-
-DROP SEQUENCE IF EXISTS seq_versions;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
index 441adfc..a93373c 100644
--- a/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
+++ b/libraries/kiwi/kiwi-versioning/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
@@ -16,10 +16,6 @@
 # limitations under the License.
 #
 
-# get sequence numbers
-seq.versions          = SELECT nextval('seq_versions')
-seq.versions.set      = SELECT setval('seq_versions',?)
-
 load.version_by_id    = SELECT id,creator,createdAt FROM versions WHERE id = ?
 load.version_between  = SELECT id,creator,createdAt FROM versions WHERE createdAt >= ? AND createdAt <= ? ORDER BY createdAt ASC
 load.versions         = SELECT id,creator,createdAt FROM versions ORDER BY createdAt ASC

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_ldcache_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_ldcache_tables.sql b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_ldcache_tables.sql
index 08b2276..7092b4e 100644
--- a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_ldcache_tables.sql
+++ b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/create_ldcache_tables.sql
@@ -12,8 +12,6 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
-CREATE SEQUENCE seq_ldcache;
-
 CREATE TABLE ldcache_entries (
   id           bigint     NOT NULL,
   retrieved_at timestamp  NOT NULL,

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_ldcache_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_ldcache_tables.sql b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_ldcache_tables.sql
index 0f89b36..7b810ff 100644
--- a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_ldcache_tables.sql
+++ b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/drop_ldcache_tables.sql
@@ -17,4 +17,3 @@ DROP INDEX IF EXISTS idx_ldcache_resource;
 
 DROP TABLE IF EXISTS ldcache_entries;
 
-DROP SEQUENCE IF EXISTS seq_ldcache;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
index bd8b999..3bd08e0 100644
--- a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
+++ b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/h2/statements.properties
@@ -16,10 +16,6 @@
 # limitations under the License.
 #
 
-# get sequence numbers
-seq.ldcache           = SELECT nextval('seq_ldcache')
-seq.ldcache.set       = ALTER SEQUENCE seq_ldcache RESTART WITH ?
-
 load.entry_by_id      = SELECT id,retrieved_at,expires_at,resource_id,update_count,triple_count FROM ldcache_entries WHERE id = ?
 load.entry_by_uri     = SELECT E.id,retrieved_at,expires_at,resource_id,update_count,triple_count FROM ldcache_entries E, nodes N WHERE e.resource_id = N.id AND N.ntype = 'uri' and N.svalue = ?
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_ldcache_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_ldcache_tables.sql b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_ldcache_tables.sql
index b1717af..7092b4e 100644
--- a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_ldcache_tables.sql
+++ b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/create_ldcache_tables.sql
@@ -12,9 +12,6 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
-CREATE TABLE seq_ldcache (id BIGINT NOT NULL);
-INSERT INTO seq_ldcache(id) VALUES (0);
-
 CREATE TABLE ldcache_entries (
   id           bigint     NOT NULL,
   retrieved_at timestamp  NOT NULL,

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_ldcache_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_ldcache_tables.sql b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_ldcache_tables.sql
index 7ee7e2d..0289d21 100644
--- a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_ldcache_tables.sql
+++ b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/drop_ldcache_tables.sql
@@ -16,4 +16,3 @@ DROP INDEX idx_ldcache_expires ON ldcache_entries;
 DROP INDEX idx_ldcache_resource ON ldcache_entries;
 
 DROP TABLE IF EXISTS ldcache_entries;
-DROP TABLE IF EXISTS seq_ldcache;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
index 95faac7..407a087 100644
--- a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
+++ b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/mysql/statements.properties
@@ -16,10 +16,6 @@
 # limitations under the License.
 #
 
-# get sequence numbers
-seq.ldcache.prep         = UPDATE seq_ldcache SET id=LAST_INSERT_ID(id+1);
-seq.ldcache              = SELECT LAST_INSERT_ID();
-seq.ldcache.set          = UPDATE seq_ldcache SET id=?;
 
 load.entry_by_id      = SELECT id,retrieved_at,expires_at,resource_id,update_count,triple_count FROM ldcache_entries WHERE id = ?
 load.entry_by_uri     = SELECT E.id,retrieved_at,expires_at,resource_id,update_count,triple_count FROM ldcache_entries E, nodes N WHERE e.resource_id = N.id AND N.ntype = 'uri' and N.svalue = ?

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_ldcache_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_ldcache_tables.sql b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_ldcache_tables.sql
index 08b2276..7092b4e 100644
--- a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_ldcache_tables.sql
+++ b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/create_ldcache_tables.sql
@@ -12,8 +12,6 @@
 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
-CREATE SEQUENCE seq_ldcache;
-
 CREATE TABLE ldcache_entries (
   id           bigint     NOT NULL,
   retrieved_at timestamp  NOT NULL,

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_ldcache_tables.sql
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_ldcache_tables.sql b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_ldcache_tables.sql
index ab88ab3..da3a8bf 100644
--- a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_ldcache_tables.sql
+++ b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/drop_ldcache_tables.sql
@@ -16,5 +16,3 @@ DROP INDEX idx_ldcache_expires;
 DROP INDEX idx_ldcache_resource;
 
 DROP TABLE IF EXISTS ldcache_entries;
-
-DROP SEQUENCE IF EXISTS seq_ldcache;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/101f41f1/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
index d6cbb1f..3bd08e0 100644
--- a/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
+++ b/libraries/ldcache/ldcache-backend-kiwi/src/main/resources/org/apache/marmotta/kiwi/persistence/pgsql/statements.properties
@@ -16,10 +16,6 @@
 # limitations under the License.
 #
 
-# get sequence numbers
-seq.ldcache           = SELECT nextval('seq_ldcache')
-seq.ldcache.set       = SELECT setval('seq_ldcache',?)
-
 load.entry_by_id      = SELECT id,retrieved_at,expires_at,resource_id,update_count,triple_count FROM ldcache_entries WHERE id = ?
 load.entry_by_uri     = SELECT E.id,retrieved_at,expires_at,resource_id,update_count,triple_count FROM ldcache_entries E, nodes N WHERE e.resource_id = N.id AND N.ntype = 'uri' and N.svalue = ?