ITPUB??ì3
ITPUB论坛 » WEB 2.0技术 » WEB2.0 TAG体系构建

新一届的微软MVP评选已经开始,欢迎各位推荐!

标题: WEB2.0 TAG体系构建
离线 Arraystone4102
follow 836


精华贴数 9
个人空间 0
技术积分 965 (1933)
社区积分 16786 (89)
注册日期 2003-10-25
论坛徽章:22
现任管理团队成员     
      

发表于 2007-7-25 11:09 
WEB2.0 TAG体系构建

具体参考 WEB2.0 TAG体系构建.doc

DDL:
PHP code:


########################################

#1、关键字分类表, 用于对关键字的分类管理

########################################

# This table defines a community tag_cates

########################################

drop table if exists 'tag_cates';

create table 'tag_cates'

(

    
'id'          int  not null auto_increment,       #ID号,唯一

    
'cate'        varchar(50)   not   null,           #key_word所属于类别

    
'key_word'    varchar(50)   not   null,           #keyword

    
'tag_id'      int           not   null,           #外键

    
constraint fk_cate_tag foreign key('tag_id'references tags('id'),

    
primary key ('id')

)
ENGINE=InnoDB DEFAULT CHARSET=utf8 ;




__________________
只看该作者    顶部
离线 stone4102
follow 836


精华贴数 9
个人空间 0
技术积分 965 (1933)
社区积分 16786 (89)
注册日期 2003-10-25
论坛徽章:22
现任管理团队成员     
      

发表于 2007-7-25 11:14 
PHP code:


########################################

#2、关键字索引表,用于对关键字的统计

########################################

# This table defines a community tags

########################################

drop table if exists 'tags';

create table 'tags'

(

    
'id'          int  not null auto_increment,       #ID号,唯一

    
'key_word'    varchar(50)    not   null,          #keyword用于查询

    
'num'         int  default '0',                   #记录该keyword出现的次数

    
primary key ('id')

)
ENGINE=InnoDB DEFAULT CHARSET=utf8 ;




__________________
只看该作者    顶部
离线 stone4102
follow 836


精华贴数 9
个人空间 0
技术积分 965 (1933)
社区积分 16786 (89)
注册日期 2003-10-25
论坛徽章:22
现任管理团队成员     
      

发表于 2007-7-25 11:19 
PHP code:


########################################

#3、用户关键字索引表,用于记录关键字的相关信息

########################################

# This table defines a community user_tags

########################################

drop table if exists 'user_tags';

create table 'user_tags'

(

    
'id'          int  not null auto_increment,       #ID号,唯一

    
'tag_id'      int  not null,                      #tag_id

    
'user_id'     int  not null,                      #原作者的id

    
'url'         varchar(50)    not   null,          #该tag所属的文章连接url   

    
'created_at'  datetime     default null,          #关键字产生的时间

    
constraint fk_tag_user foreign key('tag_id'references tags('id'),

    
constraint fk_user_tag foreign key('user_id'references users('id'),

    
primary key ('id')

)
ENGINE=InnoDB DEFAULT CHARSET=utf8;




__________________
只看该作者    顶部
离线 stone4102
follow 836


精华贴数 9
个人空间 0
技术积分 965 (1933)
社区积分 16786 (89)
注册日期 2003-10-25
论坛徽章:22
现任管理团队成员     
      

发表于 2007-7-25 11:22 
Over,小弟水平有限,若有不足之处,望提出宝贵意见,共同改进提高  。

WEB2.0 TAG体系构建.doc




stone4102 上传了这个附件:
2007-7-25 11:22
  下载次数: 100
web2 tag体系构建.doc (681.5 KB)
 
__________________
只看该作者    顶部
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问