• 欢迎访问小杰博客网站
  • 欢迎访问小杰博客网站哦

【大数据】php代码抓取310win网站的体育比赛数据分析趋势(数据结构部分)

未分类 小杰 8年前 (2015-01-31) 1220次浏览 已收录 1个评论


下面是抓取310win网站的数据库部分:

网站彩票:
网址id,网址,网址code,网站名,权威值
彩票类型:
彩票id,彩票code,彩票名称
博彩公司:
博彩公司id,博彩公司code,博彩公司名称,权威值
球队表:
球队id,球队code,球队名称,战斗力值
信息主表:
彩票code,日期,周几,主场球队code,客场球队code,主场是否胜,主场是否赢盘,大小分
大小分表:
主表id,博彩公司code,初盘1,初盘2,当前盘口1,当前盘口2,是否变盘,盘口时间
让分表:
主表id,博彩公司code,初盘1,初盘2,当前盘口1,当前盘口2,是否变盘,盘口时间
比分表(篮球)
主表id,总分主,总分客,上半场主,上半场客,第一节主,第一节客,第二节主,第二节主,第三节主,第三节主,第四节主,第四节客,
比分表(足球)
主表id,总分主,总分客,上半场主,上半场客,
进球表(足球)
主表id,第几球,进球方式,进球主客队,进球时间
进球表(斯诺克)
主表id,第1球颜色
投注比表:
主表id,网址code,主场投注率,客场投注率,主场投注人数,客场投注人数
— select * from site;
drop table if exists site;
create table if not exists site(
site_id smallint(3) unsigned not null AUTO_INCREMENT,
site_code varchar(64) not null default ” comment ‘网址标识’,
site_www varchar(64) not null default ” comment ‘网址’,
site_name varchar(64) not null default ” comment ‘网址名称’,
site_value smallint(3) not null default ‘1’ comment ‘权威值’,
primary key site_id (site_id),
key site_code (site_code)
) engine=innodb default charset=utf8 comment=’彩票投注网站’;
— select * from lottery;
drop table if exists lottery;
create table if not exists lottery(
lottery_id smallint(3) unsigned not null AUTO_INCREMENT,
lottery_code varchar(64) not null default ” comment ‘彩票标识’,
lottery_name varchar(64) not null default ” comment ‘彩票名称’,
primary key lottery_id (lottery_id),
key lottery_code (lottery_code)
) engine=innodb default charset=utf8 comment=’彩票类型’;
— select * from company;
drop table if exists company;
create table if not exists company(
company_id smallint(3) unsigned not null AUTO_INCREMENT,
company_code varchar(64) not null default ” comment ‘博彩公司标识’,
company_name varchar(64) not null default ” comment ‘博彩公司名称’,
company_value smallint(3) not null default ‘1’ comment ‘权威值’,
primary key company_id (company_id),
key company_code (company_code)
) engine=innodb default charset=utf8 comment=’博彩公司信息’;
— select * from team;
drop table if exists team;
create table if not exists team(
team_id smallint(3) unsigned not null AUTO_INCREMENT,
team_code varchar(64) not null default ” comment ‘球队标识’,
team_name varchar(64) not null default ” comment ‘球队名称’,
team_value smallint(3) not null default ‘1’ comment ‘战斗力值’,
primary key team_id (team_id),
key team_code (team_code)
) engine=innodb default charset=utf8 comment=’球队信息’;
— select * from lottery_info;
drop table if exists lottery_info;
create table if not exists lottery_info(
lottery_info_id int(8) unsigned not null AUTO_INCREMENT,
lottery_code varchar(64) not null default ” comment ‘彩票标识’,
date datetime not null default ‘1970-01-01 00:00:00’ comment ‘日期’,
week_day tinyint(2) not null default ‘0’ comment ‘周几’,
home_team_code varchar(64) not null default ” comment ‘主场球队code’,
visit_team_code varchar(64) not null default ” comment ‘客场球队code’,
is_home_team_win varchar(1) not null default ” comment ‘主队是否胜’,
is_home_team_win_position varchar(1) not null default ” comment ‘主队是否赢盘’,
big_or_small varchar(2) not null default ” comment ‘大小分’,
create_stamp datetime not null default ‘1970-01-01 00:00:00’ comment ‘创建时间’,
last_updated_stamp datetime not null default ‘1970-01-01 00:00:00’ comment ‘最后更新时间’,
primary key lottery_info_id (lottery_info_id),
key lottery_code (lottery_code),
key date (date),
key home_team_code (home_team_code),
key visit_team_code (visit_team_code),
key is_home_team_win (is_home_team_win),
key is_home_team_win_position (is_home_team_win_position),
key big_or_small (big_or_small)
) engine=innodb default charset=utf8 comment=’比赛信息’;
— select * from point;
drop table if exists point;
create table if not exists point(
point_id int(8) unsigned not null AUTO_INCREMENT,
lottery_info_id int(8) unsigned not null comment ‘比赛信息表主键’,
company_code varchar(64) not null default ” comment ‘博彩公司标识’,
point_type_id enum(‘big_small_point’,’give_point’) not null comment ‘大小分还是让分标识’,
current_postion_from tinyint(2) not null default ‘0’ comment ‘当前盘口起始’,
current_postion_to tinyint(2) not null default ‘0’ comment ‘当前盘口结束’,
is_init_position varchar(1) not null default ‘N’ comment ‘是否初盘’,
position_time datetime not null default ‘1970-01-01 00:00:00’ comment ‘盘口时间’,
create_stamp datetime not null default ‘1970-01-01 00:00:00’ comment ‘创建时间’,
last_updated_stamp datetime not null default ‘1970-01-01 00:00:00’ comment ‘最后更新时间’,
primary key point_id (point_id),
key lottery_info_id (lottery_info_id),
key company_code (company_code),
key point_type_id (point_type_id),
key is_init_position (is_init_position)
) engine=innodb default charset=utf8 comment=’大小分和让分盘口信息’;
— select * from score;
drop table if exists score;
create table if not exists score(
score_id int(8) unsigned not null AUTO_INCREMENT,
lottery_info_id int(8) unsigned not null comment ‘比赛信息表主键’,
home_total tinyint(3) not null default ‘0’ comment ‘主队总分’,
visit_total tinyint(3) not null default ‘0’ comment ‘客队总分’,
home_up_half tinyint(3) not null default ‘0’ comment ‘主队上半场总分’,
visit_up_half tinyint(3) not null default ‘0’ comment ‘客队上半场总分’,
home_first tinyint(3) not null default ‘0’ comment ‘主队第一节分数’,
home_second tinyint(3) not null default ‘0’ comment ‘主队第二节分数’,
home_third tinyint(3) not null default ‘0’ comment ‘主队第三节分数’,
home_fourth tinyint(3) not null default ‘0’ comment ‘主队第四节分数’,
visit_first tinyint(3) not null default ‘0’ comment ‘客队第一节分数’,
visit_second tinyint(3) not null default ‘0’ comment ‘客队第二节分数’,
visit_third tinyint(3) not null default ‘0’ comment ‘客队第三节分数’,
visit_fourth tinyint(3) not null default ‘0’ comment ‘客队第四节分数’,
create_stamp datetime not null default ‘1970-01-01 00:00:00’ comment ‘创建时间’,
last_updated_stamp datetime not null default ‘1970-01-01 00:00:00’ comment ‘最后更新时间’,
primary key score_id (score_id),
key lottery_info_id (lottery_info_id)
) engine=innodb default charset=utf8 comment=’分数信息’;
— select * from goal;
drop table if exists goal;
create table if not exists goal(
goal_id int(8) unsigned not null AUTO_INCREMENT,
lottery_info_id int(8) unsigned not null comment ‘比赛信息表主键’,
goal_number tinyint(3) not null default ‘0’ comment ‘第几个进球’,
goal_type_id enum(‘shemen’,’touqiu’,’wulong’,’dianqiu’,’renyiqiu’) not null default ‘shemen’ comment ‘进球方式’,
team_code varchar(64) not null default ” comment ‘进球的球队编码’,
goal_color_id enum(‘black’,’blue’,’yellow’,’pink’,’green’,’gray’) not null default ‘black’ comment ‘进球颜色’,
goal_time varchar(10) not null default ” comment ‘进球时间’,
create_stamp datetime not null default ‘1970-01-01 00:00:00’ comment ‘创建时间’,
last_updated_stamp datetime not null default ‘1970-01-01 00:00:00’ comment ‘最后更新时间’,
primary key goal_id (goal_id),
key lottery_info_id (lottery_info_id),
key goal_type_id (goal_type_id),
key goal_color_id (goal_color_id),
key team_code (team_code)
) engine=innodb default charset=utf8 comment=’进球信息’;
— select * from vote;
drop table if exists vote;
create table if not exists vote(
vote_id int(8) unsigned not null AUTO_INCREMENT,
lottery_info_id int(8) unsigned not null comment ‘比赛信息表主键’,
site_code varchar(64) not null default ” comment ‘网址code’,
home_vote decimal(4,2) not null default ‘00.00’ comment ‘主队投注率’,
visit_vote decimal(4,2) not null default ‘00.00’ comment ‘客队投注率’,
home_vote_number int(8) unsigned not null default ‘0’ comment ‘主队投注人数’,
visit_vote_number int(8) unsigned not null default ‘0’ comment ‘客队投注人数’,
vote_time varchar(10) not null default ” comment ‘投注统计时间’,
create_stamp datetime not null default ‘1970-01-01 00:00:00’ comment ‘创建时间’,
last_updated_stamp datetime not null default ‘1970-01-01 00:00:00’ comment ‘最后更新时间’,
primary key vote_id (vote_id),
key lottery_info_id (lottery_info_id),
key site_code (site_code),
key vote_time (vote_time)
) engine=innodb default charset=utf8 comment=’投注信息’;

代码的部分见文章:【大数据】php代码抓取310win网站的体育比赛数据分析趋势


小杰博客 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:【大数据】php代码抓取310win网站的体育比赛数据分析趋势(数据结构部分)
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址