bigdata/chapter2/init.sql

45 lines
1.2 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 初始化脚本
create table crawl_infos (
`id` int(11) NOT NULL AUTO_INCREMENT,
total_count int comment '采集总量',
today_total_count int comment '当天采集量',
product_count int comment '产品采集条数',
today_product_count int comment '当天产品采集条数',
comment_count int comment '评论采集条数',
today_comment_count int comment '当天评论采集条数',
created_at datetime DEFAULT CURRENT_TIMESTAMP comment '统计时间',
PRIMARY KEY (`id`)
) COMMENT='采集信息表';
create table platform_infos (
`id` int(11) NOT NULL AUTO_INCREMENT,
free_cpu int comment '空闲cpu',
us_cpu int comment '用户cpu使用量',
sys_cpu int comment '系统cpu使用量',
total_memory int comment '总内存',
used_memory int comment '占用内存',
freed_memory int comment '空闲内存',
process_count int comment '进程数'
uptime varchar(255) comment '启动时间'
) comment='平台信息';
create table news (
`id` int(11) NOT NULL AUTO_INCREMENT,
comment_time varchar(255) comment '评论时间',
content varchar(1024) comment '评论内容',
comment_id varchar(255) comment '评论ID',
PRIMARY KEY (`id`)
)comment='最新抓取的20条信息';