<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                轉載請注明出處:[http://blog.csdn.net/xiaojimanman/article/details/45694049](http://blog.csdn.net/xiaojimanman/article/details/45694049) [http://www.llwjy.com/blogdetail/fa404163e42295646ab6e36e1ddb1037.html](http://www.llwjy.com/blogdetail/fa404163e42295646ab6e36e1ddb1037.html) 個人博客站已經上線了,網址 [www.llwjy.com](http://www.llwjy.com) ~歡迎各位吐槽~ ------------------------------------------------------------------------------------------------- 首先和大家說一聲抱歉,由于最近公司和個人的原因,博客停更已經有一個月了,最近自己會慢慢的恢復博客的更新。 在前面的幾篇中已經介紹了縱橫中文小說網的采集,這篇博客就介紹下數據庫的設計。 **設計思路** 對于縱橫中文小說網的四個采集類,我們將設計四張表來存儲相關的信息。表**crawllist**主要存儲采集的入口,存儲著采集的地址、采集狀態和采集頻率;表**novelinfo**存儲由更新列表頁采集程序得到的url,并通過簡介頁采集程序將其他的信息更新完整;表**novelchapter**存儲由章節列表采集程序得到的信息;表**novelchapterdetail**存儲由小說閱讀頁采集程序得到的信息。表novelchapterdetail的信息可以合并到表novelchapter中,但這里為了以后的拓展需要,特意將其分開。 在這些表中,添加一個**state**字段,該字段標識這該項目下的url是否需要采集,這個字段是實現分布式采集的關鍵所在。 **表設計圖** ![](https://box.kancloud.cn/2016-02-22_56ca7bf28b959.jpg) **sql文** ~~~ /* Navicat MySQL Data Transfer Source Server : 本機數據庫 Source Server Version : 50151 Source Host : localhost:3306 Source Database : novel Target Server Type : MYSQL Target Server Version : 50151 File Encoding : 65001 Date: 2015-05-13 15:37:35 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `crawllist` 小說采集入口 -- ---------------------------- DROP TABLE IF EXISTS `crawllist`; CREATE TABLE `crawllist` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `url` varchar(100) NOT NULL,##采集url `state` enum('1','0') NOT NULL,##采集狀態 `info` varchar(100) DEFAULT NULL,##描述 `frequency` int(11) DEFAULT '60',##采集頻率 PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for `novelchapter` 小說章節信息 -- ---------------------------- DROP TABLE IF EXISTS `novelchapter`; CREATE TABLE `novelchapter` ( `id` varchar(32) NOT NULL, `url` varchar(100) NOT NULL,##閱讀頁URL `title` varchar(50) DEFAULT NULL,##章節名 `wordcount` int(11) DEFAULT NULL,##字數 `chapterid` int(11) DEFAULT NULL,##章節排序 `chaptertime` bigint(20) DEFAULT NULL,##章節時間 `createtime` bigint(20) DEFAULT NULL,##創建時間 `state` enum('1','0') NOT NULL,##采集狀態 PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for `novelchapterdetail` 小說章節詳細信息 -- ---------------------------- DROP TABLE IF EXISTS `novelchapterdetail`; CREATE TABLE `novelchapterdetail` ( `id` varchar(32) NOT NULL, `url` varchar(100) NOT NULL,##閱讀頁url `title` varchar(50) DEFAULT NULL,##章節標題 `wordcount` int(11) DEFAULT NULL,##字數 `chapterid` int(11) DEFAULT NULL,##章節排序 `content` text,##正文 `chaptertime` bigint(20) DEFAULT NULL,##章節時間 `createtime` bigint(20) DEFAULT NULL,##創建時間 `updatetime` bigint(20) DEFAULT NULL,##最后更新時間 PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for `novelinfo` 小說簡介信息 -- ---------------------------- DROP TABLE IF EXISTS `novelinfo`; CREATE TABLE `novelinfo` ( `id` varchar(32) NOT NULL, `url` varchar(100) NOT NULL,##簡介頁url `name` varchar(50) DEFAULT NULL,##小說名 `author` varchar(30) DEFAULT NULL,##作者名 `description` text,##小說簡介 `type` varchar(20) DEFAULT NULL,##分類 `lastchapter` varchar(100) DEFAULT NULL,##最新章節名 `chaptercount` int(11) DEFAULT NULL,##章節數 `chapterlisturl` varchar(100) DEFAULT NULL,##章節列表頁url `wordcount` int(11) DEFAULT NULL,##字數 `keywords` varchar(100) DEFAULT NULL,##關鍵字 `createtime` bigint(20) DEFAULT NULL,##創建時間 `updatetime` bigint(20) DEFAULT NULL,##最后更新時間 `state` enum('1','0') NOT NULL,##采集狀態 PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ~~~ ---------------------------------------------------------------------------------------------------- ps:最近發現其他網站可能會對博客轉載,上面并沒有源鏈接,如想查看更多關于 [基于lucene的案例開發](http://www.llwjy.com/blogtype/lucene.html) 請[點擊這里](http://blog.csdn.net/xiaojimanman/article/category/2841877)。或訪問網址http://blog.csdn.net/xiaojimanman/article/category/2841877 或 http://www.llwjy.com/blogtype/lucene.html
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看