--
drop database if exists db_pairecdemo ;
create database db_pairecdemo;

use db_pairecdemo;
--
create table t_recall(user_id VARCHAR(256) PRIMARY KEY, item_ids VARCHAR(4096));
INSERT INTO t_recall(user_id, item_ids) VALUES('100001', '200001,200002,200003');
select * from t_recall;

--
create table t_userfeature(user_id VARCHAR(256) PRIMARY KEY, c1 VARCHAR(1024), c14 VARCHAR(1024),c15 VARCHAR(1024),c16 VARCHAR(1024),c17 VARCHAR(1024),c18 VARCHAR(1024),c19 VARCHAR(1024),c20 VARCHAR(1024),c21 VARCHAR(1024));
INSERT INTO t_userfeature(user_id, c1,c14,c15,c16,c17,c18,c19,c20,c21) VALUES('100001','1005','2035','30','25','234','2','4','1002','3');
select * from t_userfeature;

--
create table t_itemfeature(item_id VARCHAR(256) PRIMARY KEY, hour VARCHAR(1024),banner_pos VARCHAR(1024),site_id VARCHAR(1024),site_domain VARCHAR(1024),site_category VARCHAR(1024),app_id VARCHAR(1024),app_domain VARCHAR(1024),app_category VARCHAR(1024),device_id VARCHAR(1024),device_ip VARCHAR(1024),device_model VARCHAR(1024),device_type VARCHAR(1024),device_conn_type VARCHAR(1024));
INSERT INTO t_itemfeature(item_id,hour,banner_pos,site_id,site_domain,site_category,app_id,app_domain,app_category,device_id,device_ip,device_model,device_type,device_conn_type) VALUES('200001','21','0','5b08c53b','7687a86e','3e814130','ecad2386','7801e8d9','07d7df22','a99f214a','9d046c7f','9a45a8e8','1','0');
INSERT INTO t_itemfeature(item_id,hour,banner_pos,site_id,site_domain,site_category,app_id,app_domain,app_category,device_id,device_ip,device_model,device_type,device_conn_type) VALUES('200002','21','0','5b08c53b','7687a86e','3e814130','ecad2386','7801e8d9','07d7df22','a99f214a','9d046c7f','9a45a8e8','23','66');
INSERT INTO t_itemfeature(item_id,hour,banner_pos,site_id,site_domain,site_category,app_id,app_domain,app_category,device_id,device_ip,device_model,device_type,device_conn_type) VALUES('200003','21','0','5b08c53b','7687a86e','3e814130','ecad2386','7801e8d9','07d7df22','a99f214a','9d046c7f','9a45a8e8','98','20');
INSERT INTO t_itemfeature(item_id,hour,banner_pos,site_id,site_domain,site_category,app_id,app_domain,app_category,device_id,device_ip,device_model,device_type,device_conn_type) VALUES('1021098','21','0','5b08c53b','7687a86e','3e814130','ecad2386','7801e8d9','07d7df22','a99f214a','9d046c7f','9a45a8e8','98','20');
INSERT INTO t_itemfeature(item_id,hour,banner_pos,site_id,site_domain,site_category,app_id,app_domain,app_category,device_id,device_ip,device_model,device_type,device_conn_type) VALUES('1003854','21','0','5b08c53b','7687a86e','3e814130','ecad2386','7801e8d9','07d7df22','a99f214a','9d046c7f','9a45a8e8','98','20');
INSERT INTO t_itemfeature(item_id,hour,banner_pos,site_id,site_domain,site_category,app_id,app_domain,app_category,device_id,device_ip,device_model,device_type,device_conn_type) VALUES('1044093','21','0','5b08c53b','7687a86e','3e814130','ecad2386','7801e8d9','07d7df22','a99f214a','9d046c7f','9a45a8e8','98','20');
INSERT INTO t_itemfeature(item_id,hour,banner_pos,site_id,site_domain,site_category,app_id,app_domain,app_category,device_id,device_ip,device_model,device_type,device_conn_type) VALUES('1038307','21','0','5b08c53b','7687a86e','3e814130','ecad2386','7801e8d9','07d7df22','a99f214a','9d046c7f','9a45a8e8','98','20');
INSERT INTO t_itemfeature(item_id,hour,banner_pos,site_id,site_domain,site_category,app_id,app_domain,app_category,device_id,device_ip,device_model,device_type,device_conn_type) VALUES('1001443','21','0','5b08c53b','7687a86e','3e814130','ecad2386','7801e8d9','07d7df22','a99f214a','9d046c7f','9a45a8e8','98','20');
select * from t_itemfeature;

---
create table user_embedding(user_id VARCHAR(256) PRIMARY KEY, embedding VARCHAR(4096));