文件名称:twitter
- 所属分类:
- SQL Server数据库
- 资源属性:
- [SQL] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 李**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
twitter可以看成是一种微博客,其基本结构由发布者和跟随者组成。设计如下表格:
user(uid, uname, rank), 初始时rank=0; follow(idol, fan), 表示fan跟随了idol;message(msg_id, uid, msg_content),存储所有发布的消息,uid是消息发布者的标识。
使用触发器完成如下功能:当往message表中插入新消息后,检索follow表,把该消息发送给它的生成者的fans,当然只要显示“***收到了****消息”即可。
同时使用触发器维护user表中的rank,rank=(用户发布的消息数*该用户的fans数量)/100,当然你可以给出更精确的定义。-twitter can be seen as a micro blog, its basic structure from the publisher and the composition of the follower. Design the form as follows:
user (uid, uname, rank), initially rank = 0 follow (idol, fan), said the fan following of the idol message (msg_id, uid, msg_content), store all the news published, uid is the message publisher identity.
Use the trigger to complete the following functions: When the message table to insert new messages, the search follow the table, to the message sent to it the formation of those fans, of course, as long as the display "******* received the message" can .
Also use triggers to maintain user in the table rank, rank = (number of users to publish news of the fans* The number of users)/100, of course, you can give a more precise definition.
user(uid, uname, rank), 初始时rank=0; follow(idol, fan), 表示fan跟随了idol;message(msg_id, uid, msg_content),存储所有发布的消息,uid是消息发布者的标识。
使用触发器完成如下功能:当往message表中插入新消息后,检索follow表,把该消息发送给它的生成者的fans,当然只要显示“***收到了****消息”即可。
同时使用触发器维护user表中的rank,rank=(用户发布的消息数*该用户的fans数量)/100,当然你可以给出更精确的定义。-twitter can be seen as a micro blog, its basic structure from the publisher and the composition of the follower. Design the form as follows:
user (uid, uname, rank), initially rank = 0 follow (idol, fan), said the fan following of the idol message (msg_id, uid, msg_content), store all the news published, uid is the message publisher identity.
Use the trigger to complete the following functions: When the message table to insert new messages, the search follow the table, to the message sent to it the formation of those fans, of course, as long as the display "******* received the message" can .
Also use triggers to maintain user in the table rank, rank = (number of users to publish news of the fans* The number of users)/100, of course, you can give a more precise definition.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
触发器.sql