web-3g-163(网易)-邮箱和博客-数据架构设计
专题图编号:ylbtechASPNET
1,功能描述 |
2,技术与环境 |
3,数据库设计 |
3g163EMail.sql
USE MASTER
go
-- =============================================
-- ylb: 3g版网易邮箱
-- url: http://m.mail.163.com/
-- devloper:ylb,tech
-- author: YuanBo
-- date: 11:11 2012-07-05
-- =============================================
IF EXISTS ( SELECT *
FROM master..sysdatabases
WHERE name = N '_3g163EMail' )
DROP DATABASE _3g163EMail
GO
CREATE DATABASE _3g163EMail
GO
USE _3g163EMail
GO
-- =============================================
-- ylb: 1.1邮箱帐户表
-- =============================================
create table MailUsers
(
mailUser varchar (100) primary key , --帐号名称[PK]
pwd varchar (100) not null --密码
)
|
3,数据库设计 |
2, 3g163Blog.sql
USE MASTER
go
-- =============================================
-- ylb: 3g版网易博客
-- url: http://3g.163.com/blog/
-- devloper:ylb,tech
-- author: YuanBo
-- date: 11:11 2012-07-05
-- =============================================
IF EXISTS ( SELECT *
FROM master..sysdatabases
WHERE name = N '_3g163Blog' )
DROP DATABASE _3g163Blog
GO
CREATE DATABASE _3g163Blog
GO
USE _3g163Blog
GO
--ylb:1, 用户
GO
-- =============================================
-- ylb: 1.1,用户基本资料表
-- =============================================
create table Users
(
userId int primary key identity(100,1), --编号【PK】
nickname varchar (200) not null , --昵称
realname varchar (200) null , --真实姓名
sex char (1) check (sex in ( 'M' , 'F' , 'N' )) default ( 'N' ), --性别M:男;F:女;N:未知
birthday datetime, --生日
constellation int , --星座
province varchar (100), --现居住地-省
city varchar (100), --现居住地-市
county varchar (100), --现居住地-县
mailUser varchar (100) not null --用户账号[FP], 于网易登录系统MailUser表的mailUser列相关
)
GO
-- =============================================
-- ylb: 1.2,博客统计表
-- =============================================
create table BlogStatistics
(
blogStatisticsId int primary key identity(100,1), --编号【PK】
todayAccessNo int default (0), --今日访问量
sunAccessNo int default (0), --总访问量
integral int default (0), --博客等级
userId int references Users(userId) --积分【FK】
)
--ylb:2,日志
GO
-- =============================================
-- ylb: 2.1,日志分类表
-- =============================================
create table BlogClass
(
blogClassId int primary key identity(100,1), --编号【PK】
className varchar (100) not null , --分类名称
userId int references Users(userId) --用户编号【FK】
)
GO
-- =============================================
-- ylb: 2.2,日志表
-- =============================================
--drop table Article
create table Article
(
articleId int primary key identity(1,1), --编号【PK】
title varchar (200) not null , --标题
content varchar (5000), --内容
blogClassId int references BlogClass(blogClassId), --分类编号【FK】
pubdate datetime default (getdate()), --分布日期
readCnt int default (0), --阅读数量
replyCnt int default (0), --回复数量
allowView int default (0), --显示范围权限 -100:公开;100:好友;1000:私人
draftFlag int default (0), --0:发送;1:保存草稿
userId int references Users(userId) --用户编号[FK]
)
GO
-- =============================================
-- ylb: 2.3,日志评论表
-- =============================================
create table ArticleReply
(
articleReplyId int primary key identity(100,1), --编号【PK】
content varchar (200) not null , --内容
pubdate datetime default (getdate()), --回复时间
userId int references Users(userId), --回复人,用户编号【FK】
articleId int references Article(articleId) --文章编号[FK]
)
--ylb:3, 相册
GO
-- ylb: 3.1 相册类别表
-- =============================================
-- ylb: 3.1.1 相册类别表
-- =============================================
create table Album
(
albumId int primary key identity(1,1), --编号【PK】
albumName varchar (100) not null , --相册名
pubdate datetime default (getdate()), --创建时间
userId int references Users(userId), --用户编号【PF】
albumUrl varchar (100) --封面图片
)
GO
-- =============================================
-- ylb: 3.1.2 相册类别评论表
-- =============================================
create table ReplyAlbum
(
replyAlbumId int primary key identity(100,1), --编号
content varchar (200) not null , --评论内容
pubdate datetime default (getdate()), --评论时间
baseId int default (0), --评论级次 0:发表;其他:回复|跟贴
albumId int references Album(albumId), --相册编号[FK]
userId int references Users(userId) --用户编号[FK]
)
-- ylb: 3.2 相册表
GO
-- =============================================
-- ylb: 3.2.1 相册表
-- =============================================
create table Photo
(
photoId int primary key identity(100,1), --编号【PK】
imgUrl varchar (100), --保存地址
imgDesc varchar (100), --描述 [注:3g版不显示]
albumId int references Album(albumId), --相册编号[FK]
userId int references Users(userId) --用户编号[FK] 有争议
)
GO
-- =============================================
-- ylb: 3.2.2 相册评论表
-- =============================================
create table ReplyPhoto
(
replyPhotoId int primary key identity(100,1), --编号
content varchar (200) not null , --评论内容
pubdate datetime default (getdate()), --评论时间
baseId int default (0), --评论级次 0:发表;其他:回复|跟贴
photoId int references Photo(photoId), --照片编号[FK]
userId int references Users(userId) --用户编号[FK]
)
GO
-- =============================================
-- ylb: 4,博友组表
-- =============================================
create table FriendsGroup
(
friendsGroupId int primary key identity(100,1), --编号【PK】
friendsGroupName varchar (100), --组名
userId int references Users(userId) --用户编号【FK】
)
GO
-- =============================================
-- ylb: 4,博友表
-- =============================================
create table Friend
(
friendId int references Users(userId), --编号
userId int references Users(userId), --用户编号
pubdate datetime default (getdate()), --加添时间
friendsGroupId int references FriendsGroup(friendsGroupId) --好友分组【FK】
)
-- ylb: 5,消息
GO
-- =============================================
-- ylb: 5, 消息表
-- =============================================
create table Msg
(
msgId int primary key identity(100,1), --编号【PK】
inUserId int references Users(userId), --接受用户编号【FK】
sendUserId int references Users(userId), --发送用户编号【FK】
content varchar (200), --内容
pubdate datetime default (getdate()) --发送时间
)
GO
-- =============================================
-- ylb: 6, 留言表
-- =============================================
create table Note
(
noteId int primary key identity(1,1), --编号
content varchar (200), --内容
pubdate datetime default (getdate()), --时间
inUserId int , --主人编号
sendUserid int --发送人编号
)
GO
-- =============================================
-- ylb: 7, 通知表
-- =============================================
create table Notice
(
noticeId int primary key identity(1,1), --编号
content varchar (200), --内容
pubdate datetime default (getdate()), --时间
remark varchar (200), --备注
inUserId int --主人编号
)
GO
-- =============================================
-- ylb: 7, 最近访客
-- =============================================
create table RecentVisitor
(
recentVisitorId int primary key identity(1,1), --编号
hostId int , --主人编号
visitId int , --来访者编号
pubdate datetime default (getdate()) --时间
)
GO
-- =============================================
-- ylb: 7, 最近走访
-- =============================================
create table RecentVisited
(
recentVisitedId int primary key identity(1,1), --编号
hostId int , --主人编号
visitId int , --来访者编号
pubdate datetime default (getdate()) --时间
)
GO
-- =============================================
-- ylb: 7, 最近走访
-- =============================================
create table RecentVisit
(
recentVisitId int primary key identity(1,1), --编号
hostId int , --主人编号
visitId int , --来访者编号
pubdate datetime default (getdate()), --时间
type varchar (100) --类型
)
GO
-- =============================================
-- ylb: 8, 心情随笔
-- =============================================
create table Feeling
(
feelingId int primary key identity(1,1), --编号
content varchar (200), --内容
pubdate datetime default (getdate()), --时间
baseId int , --baseId=0:首发;baseId=num:则恢复
userId int --用户编号
)
GO
print '网易博客数据创建完成'
|
/2, 3g163Blog/1, Users.sql
/2, 3g163Blog/2, BlogClass.sql
/2, 3g163Blog/3, Article.sql
/2, 3g163Blog/4, ArticleReply.sql
/2, 3g163Blog/5, Album.sql
/2, 3g163Blog/5, Photo.sql
/2, 3g163Blog/7, ReplyAlbum.sql
/2, 3g163Blog/8, ReplyPhoto.sql
/2, 3g163Blog/9, Note.sql
/2, 3g163Blog/10,Notice.sql
/2, 3g163Blog/11,Feeling.sql
/2, 3g163Blog/12, RecentVisit.sql
/2, 3g163Blog/13, FriendsGroup.sql
/2, 3g163Blog/14,Friend.sql
/2, 3g163Blog/
4.1,前台
5,代码分析 |
解决方案属性图
6,示例|讲解案例下载 |
博客园讲解: http://ylbtech.cnblogs.com/
百度文库开发文档: http://passport.baidu.com/?business&aid=6&un=ylbtech#7
谷歌开源代码下载: http://code.google.com/p/ylbtechopensource/downloads/list
请单击“搜索框设默认DropDown”
本文转自ylbtech博客园博客,原文链接:http://www.cnblogs.com/ylbtech/archive/2012/09/05/2672244.html,如需转载请自行联系原作者
web-3g-163(网易)-邮箱和博客-数据架构设计相关推荐
- Java实现163网易邮箱消息发送
今天有个任务,就是使用Java实现163网易邮箱的发送,说实话,一开始我也不是很清楚,紧接着我就去找资料,后来才发现,那些资料的好老,还需要手动复制jar包到咱们的项目,有些博客还不告诉你有jar包, ...
- 终于解决!——iPhone自带的邮件应用如何绑定163网易邮箱?
首先,这种问题163网易邮箱自己的帮助中心肯定有涉及,但实际上它写的并不全:http://help.mail.163.com/faqDetail.do?code=d7a5dc8471cd0c0e8b4 ...
- java web论文_(定稿)毕业论文基于JavaWeb技术博客项目的设计论文(完整版)最新版...
<[毕业论文]基于Java Web技术博客项目的设计论文.doc>由会员分享,可免费在线阅读全文,更多与<(定稿)毕业论文基于Java Web技术博客项目的设计论文(完整版)> ...
- WEB安全之PHP安全开发 博客系统(二):前台js登陆验证、套用模板主体修改登陆和后台样式
WEB安全之PHP安全开发 博客系统(二):前台js登陆验证.套用模板主体修改登陆和后台样式 前台验证 模板的套用 后台模板的套用 前台验证 做自动提交 点击登陆,自动提交 如果等于false,不会提 ...
- 自动备份Linux上的博客数据到坚果云
欢迎访问陈同学博客原文 本文主要内容拷贝于这篇文章 备份Linux系统数据到坚果云,自己做了些拓展,感谢作者. 本文分享两个博客相关小技巧,一是自动备份Linux上博客数据到坚果云和本机,二是搭建一个 ...
- 基于Spring Boot的个人博客系统的设计与实现毕业设计源码271611
目 录 摘要 1 绪论 1.1研究意义 1.2开发背景 1.3系统开发技术的特色 1.4论文结构与章节安排 2个人博客系统系统分析 2.1 可行性分析 2.2 系统流程分析 2.2.1数据增加流程 ...
- springboot基于vue.js的掌上博客系统的设计与实现毕业设计源码063131
Springboot掌上博客系统的设计与实现 摘 要 掌上博客系统是当今网络的热点,博客技术的出现使得每个人可以零成本.零维护地创建自己的网络媒体,Blog站点所形成的网状结构促成了不同于以往社区的B ...
- (附源码)springboot基于vue.js的掌上博客系统的设计与实现 毕业设计 063131
Springboot掌上博客系统的设计与实现 摘 要 掌上博客系统是当今网络的热点,博客技术的出现使得每个人可以零成本.零维护地创建自己的网络媒体,Blog站点所形成的网状结构促成了不同于以往社区的B ...
- Blog博客系统数据库设计
2019独角兽企业重金招聘Python工程师标准>>> 项目--Blog博客系统数据库设计:http://blog.163.com/sean_zwx/blog/static/1690 ...
- each 数据获取attr_我背着CSDN偷偷记录了大半年我博客数据
作为一个数据控+一个有追求的技术博主,总是希望自己能知道自己博客历史每日粉丝数量.阅读量.积分.评论--的数据,然而官方博客管理后台给展示的数据太少了,只有每日访问量.评论数.粉丝数.收藏数这几个数据 ...
最新文章
- deeplearning模型分析
- 图灵七月书讯【Cassandra权威指南将在7月末上市】
- springboot 添加拦截器之后中文乱码_springboot中配置了拦截器后,拦截器无效的解决方案之一...
- 使用supervisor支持Python3程序 (解决找不到Module的问题)
- 使用Docker镜像和仓库
- jays+android耳机,android – 响应多按钮有线耳机
- 系统集成的系统架构图的相关的vsd素材_信息系统集成专业技术知识:软件架构...
- 普通人如何走上复利投资致富的门路?
- TimePickerView(日期选择器)
- sql server 别名_SQL Server别名概述
- linux子网掩码和ip计算,子网掩码的计算 - winglok的个人页面 - OSCHINA - 中文开源技术交流社区...
- nand ECC 算法记录
- 极客大学架构师训练营 系统架构 CAP原理 分布式系统脑裂 第六次作业
- 【深入浅出精华版视频】-刘意day01-10思维导图整理
- jboss-remoting服务
- 第一次作为面试官的感悟
- JS - 4 - 数组 Array - API(slice、splice、shift、)
- 关于利用kali linux2017.2中MSFCONSOLE 利用MS17-010漏洞发起攻击的坑
- 用python输出沙漏_sandglass(沙漏)——一个让人解脱的python时间处理库
- 裴波那契数列(循环实现递归)