Home

Awesome

[chinese-poetry-mysql] is being sponsored by the following tool; please help to support us by taking a look and signing up to a free trial <a href="https://tracking.gitads.io/?repo=chinese-poetry-mysql"> <img src="https://images.gitads.io/chinese-poetry-mysql" alt="GitAds"/> </a>

chinese-poetry-mysql

基于 chinese-poetry 数据整理的一份 mysql 格式数据

表结构说明

#####唐宋诗数据表
create table poetry (
  id int(11) not null primary key auto_increment,
  author_id int(11) default 0,
  title varchar(255) not null,
  content text not null,
  yunlv_rule text default null,
  author varchar(255) not null,
  dynasty char(1) not null
) engine = myisam, charset=utf8;

#####唐宋诗作者数据表
create table poetry_author (
  id int(11) not null primary key auto_increment,
  name varchar(255) not null,
  intro text default null,
  dynasty char(1) not null
) engine = myisam, charset=utf8;

#####宋词作者数据表
create table poems_author (
  id int(11) not null primary key auto_increment,
  name varchar(255) not null,
  intro_l text default null,
  intro_s text default null
) engine = myisam, charset=utf8;

#####宋词数据表
create table poems (
  id int(11) not null primary key auto_increment,
  author_id int(11) default 0,
  title varchar(255) not null,
  content text not null,
  author varchar(255) not null
) engine = myisam, charset=utf8;

#####论语数据表
create table lunyu (
  id int(11) not null primary key auto_increment,
  chapter varchar(255) not null,
  content text not null
) engine = myisam, charset=utf8;

#####诗经数据表
create table shijing (
  id int(11) not null primary key auto_increment,
  title varchar(255) not null,
  chapter varchar(255) not null,
  section varchar(255) not null,
  content text not null
) engine = myisam, charset=utf8;

数据表字段说明

生成脚本说明

本项目中提供的 sql 压缩包是使用这个脚本生成的,因此对于需要即时更新的使用者,可以使用该脚本手动生成一份最新的 sql 数据.步骤如下:

$poetryBasePath  = "/data/opensource/chinese-poetry";
$poetryDataPath  = $poetryBasePath."/json";
$poemsDataPath   = $poetryBasePath."/ci";
$lunyuDataPath   = $poetryBasePath."/lunyu";
$shijingDataPath = $poetryBasePath."/shijing";
$host = "127.0.0.1";
$port = 3306;
$username = "root";
$password = "1234";
$poetryDb = "poetry_new";
php mksql.php

sql 压缩数据导出及回放步骤

升级日志

2018-10-08

2019-04-12