freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

數(shù)據(jù)庫課程設(shè)計(新聞發(fā)布系統(tǒng))(留存版)

2025-04-28 01:50上一頁面

下一頁面
  

【正文】 create table Comment( CommentID int primary key identity(1,1), CommentTitle nvarchar(50) not null, CommentContent ntext not null, CommentDate datetime default getdate() 14 ) 權(quán)限評論表 create table Roles_Comment( RCID int identity(1,1), RoleID int, constraint RCPK primary key(RCID,RoleID), constraint RCFK foreign key(RoleID) references Roles(RoleID), ) 用戶表 create table Users( UserID int primary key identity(1,1), UserName nvarchar(20) not null, UserPassword nvarchar(20) not null, UserEmail nvarchar(20) not null ) 用戶評論表 create table Users_Comment( UCID int identity(1,1), UserID int, CommentID int, constraint UCPK primary key(UCID,UserID,CommentID), constraint UCFK foreign key(UserID) references Users(UserID), constraint UCFK2 foreign key(CommentID) references Comment(CommentID) ) 新聞表 create table News( NewsID int primary key identity(1,1), NewsTitle nvarchar(50) not null, NewsContent ntext not null, NewsDate datetime default getdate(), NewsDesc nvarchar(50) not null, NewsImagePath nvarchar(50), NewsRate int, NewsIsCheck bit, NewsIsTop bit ) 新聞評論表 create table News_Comment( NCommentID int identity(1,1), NewsID int, CommentID int, constraint NCommentPK primary key(NCommentID,NewsID,CommentID), constraint NCommentFK foreign key(NewsID) references News(NewsID), constraint NCommentFK2 foreign key(CommentID) references Comment(CommentID) ) 新聞模塊表 create table News_Modules( NMID int identity(1,1), NewsID int, ModuleID int, constraint NMPK primary key(NMID,NewsID,ModuleID), 15 constraint NMFK foreign key(NewsID) references News(NewsID), constraint NMFK2 foreign key(ModuleID) references Modules(ModuleID) ) 欄目表 create table Category( CategoryID int primary key identity(1,1), CategoryName nvarchar(50) not null, CategoryPID int not null, CategoryDesc nvarchar(50) not null ) 新聞欄目表 create table News_Category( NCategroyID int identity(1,1), NewsID int, CategoryID int, constraint NCategroyPK primary key(NCategroyID,NewsID,CategoryID), constraint NCategroyFK foreign key(NewsID) references News(NewsID), constraint NCategroyFK2 foreign key(CategoryID) references Category(CategoryID) ) 數(shù)據(jù)操作 1)數(shù)據(jù)插入操作 向用戶表中添加一些新用戶, SQL 語句如下所示: use db_Memo insert tb_User values(39。 or week=39。 查詢結(jié)果如圖 所示 圖 帶有關(guān)鍵字 的所有密碼備忘信息 7)創(chuàng)建觸發(fā)器 在 tb_User 表中創(chuàng)建觸發(fā)器,當刪除 tb_User 表中用戶信息時,檢查該用戶名是否為 Admin(即超級用戶), 如果是則不能 刪除該條用戶信息。該系統(tǒng)只滿足于用戶實現(xiàn)對日常記錄、通訊錄和密碼備忘功能的實現(xiàn),可擴展功能很多,有待進一步完善。) 創(chuàng)建 CHECK 約束結(jié)果如圖 所示: 圖 為日常記錄表中列 Week 創(chuàng)建 CHECK_WEEK 約束結(jié)果 5)為數(shù)據(jù)庫表中列創(chuàng)建 DEFAULT 約束 新建用戶后,為用戶創(chuàng)建初始密碼,即對用戶表中列 PassWord 創(chuàng)建 DEFAULT 約束,創(chuàng)建 SQL語句如下所示: use db_Memo ALTER table tb_User ADD CONSTRAINT PassWord_Default DEFAULT 39。,4) 數(shù)據(jù)插入結(jié)果如圖 所示 圖 用戶信息表添加信息結(jié)果 2)簡單數(shù)據(jù)查詢 向新建表中插入新數(shù)據(jù)后,查詢?nèi)粘S涗浶畔ⅲ?SQL 語句如下所示: use db_Memo select Theme,Content,Date,Week,Time,City,Weather From tb_DaiRecord 數(shù)據(jù)查詢結(jié)果如圖 所示 16 圖 查詢所有日常記錄信息結(jié)果 3)嵌套查詢 根據(jù)數(shù)據(jù)庫中已添加的信息,現(xiàn)在查詢用戶 Lee 的所有好友通訊錄信息, SQL 語句如下所示: use db_Memo select Name,Tel,Email,Groups,Memo From tb_AddBook,tb_User Where = and UserNum=39。 表 新聞 _模塊 表 列名 數(shù)據(jù)類型 允許 NULL 值 說明 NMID int 否 新聞 _模塊編號 NewsID int 否 新聞編號 ModuleID int 否 模塊編號 ( 12) 新聞 _欄目 表 新聞 _欄目 表( News_Categroy)主要用來存放 新聞和欄目的關(guān)系 ,如圖 所示。邏輯結(jié)構(gòu)設(shè)計的任務(wù)就是把概念結(jié)構(gòu)設(shè)計好的基本 ER 圖轉(zhuǎn)換為與 選用的某個具體的 DBMS 所支持的數(shù)據(jù)模型相符合的邏輯結(jié)構(gòu),設(shè)計的結(jié)果是一組關(guān)系模式。數(shù)據(jù)字典中有五種類型的條目:外部實體,數(shù)據(jù)流,數(shù)據(jù)存儲,數(shù)據(jù)項和加工。根據(jù)邏輯設(shè)計方案,進行系統(tǒng)設(shè)計,重在系統(tǒng)的分析與數(shù)據(jù)庫 設(shè)計方面。 課程設(shè)計 Ⅳ 設(shè)計說明書 網(wǎng)站新聞發(fā)布與管理系統(tǒng) 的數(shù)據(jù)庫設(shè)計和數(shù)據(jù)操作 學(xué)生姓名 魯澤民 學(xué) 號 1018064030 班 級 網(wǎng)絡(luò) 101 班 成 績 指導(dǎo)教師
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1