diff --git a/product/ERP5Catalog/sql/erp5_mysql/z0_drop_predicate.zsql b/product/ERP5Catalog/sql/erp5_mysql/z0_drop_predicate.zsql
new file mode 100755
index 0000000000000000000000000000000000000000..099c6e0f51050cc473efeb134e99838fcca71ab2
--- /dev/null
+++ b/product/ERP5Catalog/sql/erp5_mysql/z0_drop_predicate.zsql
@@ -0,0 +1,11 @@
+<dtml-comment>
+title:
+connection_id:erp5_sql_connection
+max_rows:1000
+max_cache:100
+cache_time:0
+class_name:
+class_file:
+</dtml-comment>
+<params></params>
+DROP TABLE predicate
diff --git a/product/ERP5Catalog/sql/erp5_mysql/z0_drop_predicate_category.zsql b/product/ERP5Catalog/sql/erp5_mysql/z0_drop_predicate_category.zsql
new file mode 100755
index 0000000000000000000000000000000000000000..75fdccda100eda39b3894d47ce30e24025ec881b
--- /dev/null
+++ b/product/ERP5Catalog/sql/erp5_mysql/z0_drop_predicate_category.zsql
@@ -0,0 +1,11 @@
+<dtml-comment>
+title:
+connection_id:erp5_sql_connection
+max_rows:1000
+max_cache:100
+cache_time:0
+class_name:
+class_file:
+</dtml-comment>
+<params></params>
+DROP TABLE predicate_category
diff --git a/product/ERP5Catalog/sql/erp5_mysql/z_catalog_predicate.zsql b/product/ERP5Catalog/sql/erp5_mysql/z_catalog_predicate.zsql
new file mode 100755
index 0000000000000000000000000000000000000000..1894c03af038502aaadb1af034b8c2d29a3e1940
--- /dev/null
+++ b/product/ERP5Catalog/sql/erp5_mysql/z_catalog_predicate.zsql
@@ -0,0 +1,20 @@
+<dtml-comment>
+title:
+connection_id:erp5_sql_connection
+max_rows:1000
+max_cache:100
+cache_time:0
+class_name:
+class_file:
+</dtml-comment>
+<params>uid
+isPredicate
+predicate_property_dict</params>
+<dtml-if isPredicate>
+INSERT INTO predicate VALUES ( 
+  <dtml-sqlvar uid type="int">,
+    <dtml-if expr="predicate_property_dict.has_key('quantity')"><dtml-sqlvar expr="predicate_property_dict['quantity']" type="float"><dtml-else>NULL</dtml-if>,
+    <dtml-if expr="predicate_property_dict.has_key('quantity_min')"><dtml-sqlvar expr="predicate_property_dict['quantity_min']" type="float"><dtml-else>NULL</dtml-if>,
+    <dtml-if expr="predicate_property_dict.has_key('quantity_max')"><dtml-sqlvar expr="predicate_property_dict['quantity_max']" type="float"><dtml-else>NULL</dtml-if>
+  );
+</dtml-if>
diff --git a/product/ERP5Catalog/sql/erp5_mysql/z_catalog_predicate_category.zsql b/product/ERP5Catalog/sql/erp5_mysql/z_catalog_predicate_category.zsql
new file mode 100755
index 0000000000000000000000000000000000000000..b0c71c0bb10cc8fa210124b839da1818fdaeb209
--- /dev/null
+++ b/product/ERP5Catalog/sql/erp5_mysql/z_catalog_predicate_category.zsql
@@ -0,0 +1,31 @@
+<dtml-comment>
+title:
+connection_id:erp5_sql_connection
+max_rows:1000
+max_cache:100
+cache_time:0
+class_name:
+class_file:
+</dtml-comment>
+<params>uid
+getMembershipCriterionCategoryList
+isPredicate</params>
+<dtml-if isPredicate>
+<dtml-if getMembershipCriterionCategoryList>
+<dtml-let uid_list="portal_categories.getCategoryParentUidList(getMembershipCriterionCategoryList)">
+<dtml-if uid_list>
+INSERT INTO predicate_category VALUES 
+<dtml-in "uid_list">
+(<dtml-sqlvar uid type="int">, <dtml-var "_['sequence-item'][0]" >, <dtml-var "_['sequence-item'][1]" >, <dtml-var "_['sequence-item'][2]" >)
+<dtml-if 
+sequence-end><dtml-else>,</dtml-if>
+</dtml-in> 
+;
+<dtml-else>
+INSERT INTO predicate_category VALUES  (<dtml-sqlvar uid type="int">, NULL, NULL,1);
+</dtml-if>
+</dtml-let>
+<dtml-else>
+INSERT INTO predicate_category VALUES  (<dtml-sqlvar uid type="int">, NULL, NULL,1);
+</dtml-if>
+</dtml-if>
diff --git a/product/ERP5Catalog/sql/erp5_mysql/z_create_predicate.zsql b/product/ERP5Catalog/sql/erp5_mysql/z_create_predicate.zsql
new file mode 100755
index 0000000000000000000000000000000000000000..9b7b1ee7c0a312a75c7dc4c8100709253944a1c5
--- /dev/null
+++ b/product/ERP5Catalog/sql/erp5_mysql/z_create_predicate.zsql
@@ -0,0 +1,17 @@
+<dtml-comment>
+title:
+connection_id:erp5_sql_connection
+max_rows:1000
+max_cache:100
+cache_time:0
+class_name:
+class_file:
+</dtml-comment>
+<params></params>
+CREATE TABLE predicate (
+  uid INT,
+  `quantity` real ,
+  `quantity_min` real ,
+  `quantity_max` real ,
+  KEY `uid` (`uid`)
+) TYPE=InnoDB; 
diff --git a/product/ERP5Catalog/sql/erp5_mysql/z_create_predicate_category.zsql b/product/ERP5Catalog/sql/erp5_mysql/z_create_predicate_category.zsql
new file mode 100755
index 0000000000000000000000000000000000000000..0f364a2b6374631bf0dbccca3dc85130ec8c4d7f
--- /dev/null
+++ b/product/ERP5Catalog/sql/erp5_mysql/z_create_predicate_category.zsql
@@ -0,0 +1,24 @@
+<dtml-comment>
+title:
+connection_id:erp5_sql_connection
+max_rows:1000
+max_cache:100
+cache_time:0
+class_name:
+class_file:
+</dtml-comment>
+<params></params>
+# Host: 
+# Database: test
+# Table: 'category'
+# 
+CREATE TABLE `predicate_category` (
+  `uid` int(11) default '0',
+  `category_uid` int(11) default '0',
+  `base_category_uid` int(11) default '0',
+  `category_strict_membership` tinyint(1) default '0',
+  KEY `uid` (`uid`),
+  KEY `category_strict_membership` (`category_strict_membership`),
+  KEY `Membership` (`category_uid`,`base_category_uid`),
+  KEY `FuzzyMembership` (`category_uid`)
+) TYPE = InnoDB;