舆情大数据分析-dws层建库、建表

说明

dwd层在MySQL数据库中

建库

DROP TABLE IF EXISTS `t_gender_statistics`;

建表

保存性别分析

CREATE TABLE `t_gender_statistics`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `gender` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `count` int(11) NULL DEFAULT NULL,
  `oragin` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
  `create_time` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

保存情绪分析

CREATE TABLE `t_mood_statistics` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mood_type` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `count` int(11) DEFAULT NULL,
  `content` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `score` decimal(6,4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4660 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;