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

正文內(nèi)容

數(shù)據(jù)庫(kù)餐廳點(diǎn)菜管理系統(tǒng)-閱讀頁(yè)

2024-09-30 09:39本頁(yè)面
  

【正文】 Char(20) Not null 字符 菜品名稱(chēng) 與菜品號(hào)對(duì)應(yīng) price numeric( 7,2) Not null 數(shù)字 菜品價(jià)格 獨(dú)立 dishestype Char( 7) null 字符 菜品類(lèi)型 獨(dú)立 15 protein numeric( 7,2) null 數(shù)字 蛋白質(zhì)含量 獨(dú)立 calorific numeric( 7,2) null 數(shù)字 熱量 獨(dú)立 sugars numeric( 7,2) null 數(shù)字 糖分 獨(dú)立 表 桌臺(tái)表 Table 數(shù)據(jù)名與別名 類(lèi)型 (長(zhǎng)度 ) 是否為空 數(shù)據(jù)約束 數(shù)據(jù)項(xiàng)含義說(shuō) 明 與其他數(shù)據(jù)項(xiàng) 的聯(lián)系 tableNo Char( 4) Not null R 字符加 3個(gè)數(shù)字 桌臺(tái)編號(hào) 主鍵 place int Not null 數(shù)字 容納人數(shù) 獨(dú)立 level int Not null 數(shù)字 ,1 到3 桌臺(tái)等級(jí) 獨(dú)立 empty int Not null 數(shù)字 是否占用 獨(dú)立 表 Member 數(shù)據(jù)項(xiàng)名與別名 類(lèi)型 (長(zhǎng)度 ) 是否為空 數(shù)據(jù)約束 數(shù)據(jù)項(xiàng)含義說(shuō)明 與其他數(shù)據(jù)項(xiàng)的聯(lián)系 memberNo Char( 7) Not null 字符 M加 6個(gè)數(shù)字 顧客編號(hào) 主鍵 memberLevel Char( 5) Not null 字符 顧客等級(jí) 獨(dú)立 memberCount int Not null 數(shù)字, 0到10000 顧客積分 獨(dú)立 memberName Char( 20) Not null 字符 顧客名字 獨(dú)立 memberSex Char( 1) Not null 字符 顧客性別 獨(dú)立 memberBirth datetime null 日期 顧客生日 獨(dú)立 表 科學(xué)套餐表 Smeal 數(shù)據(jù)項(xiàng)名與別名 類(lèi)型 (長(zhǎng)度 ) 是否為空 數(shù)據(jù)約束 數(shù)據(jù)項(xiàng)含義說(shuō)明 與其他數(shù)據(jù)項(xiàng)的聯(lián)系 16 smealNo Char( 7) Not null 以字母 S開(kāi)頭加六位數(shù)字 套餐編號(hào) 主鍵 sPrice numeric( 7,2) Not null 數(shù)字 套餐價(jià)格 由菜品價(jià)格計(jì)算得來(lái),參照表 Dishes dishesNo Char( 7) Not null G 字符加 6個(gè)數(shù)字 菜品編號(hào) dishesNO benefit varChar(20) Not null 字符 套餐功能 獨(dú)立 表 菜單表 Menu 數(shù)據(jù)項(xiàng)名與別名 類(lèi)型 (長(zhǎng)度 ) 是否為空 數(shù)據(jù)約束 數(shù)據(jù)項(xiàng)含義說(shuō)明 與其他數(shù)據(jù)項(xiàng)的聯(lián)系 menuNo Char( 12) Not null 以字母 C開(kāi)頭加 11位數(shù)字 菜單編號(hào) 主鍵 menuDate datetime Not null 數(shù)字 時(shí)間 獨(dú)立 tableNo Char( 4) Not null R 字符加 3個(gè)數(shù)字 桌臺(tái)編號(hào) 外鍵,參照Table 表 menuSum int Not null 數(shù)字 菜單總價(jià) 由明細(xì)表中的菜品價(jià)格和菜品數(shù)量計(jì)算得出 表 MenuDetail 數(shù)據(jù)項(xiàng)名與別名 類(lèi)型 (長(zhǎng)度 ) 是否為空 數(shù)據(jù)約束 數(shù)據(jù)項(xiàng)含義說(shuō)明 與其他數(shù)據(jù)項(xiàng)的聯(lián)系 menuNo Char( 12) Not null 以字母 C開(kāi)頭加 11位數(shù)字 菜單編號(hào) 主鍵、外鍵,參照 Menu 表 dishesNo Char( 7) Not null G 字符加 6個(gè)數(shù)字 菜品編號(hào) 主鍵、外鍵,參照 Dishes表 Price numeric( 7,2) Not 數(shù)字 菜品價(jià)格 與菜品對(duì)應(yīng) qty Int Not null 數(shù)字 菜品數(shù)量 獨(dú)立 表 科學(xué)套餐明細(xì)表 SmealDetail 17 數(shù)據(jù)項(xiàng)名與別名 類(lèi)型 (長(zhǎng)度 ) 是否為空 數(shù)據(jù)約束 數(shù)據(jù)項(xiàng)含義說(shuō)明 與其他數(shù)據(jù)項(xiàng)的聯(lián)系 smealNo Char( 12) Not null 有系統(tǒng)自動(dòng)按時(shí)間提供 科學(xué)套餐編號(hào) 主鍵、外鍵,參照 Menu 表 dishesNO Char( 7) Not null G 字符加 6個(gè)數(shù)字 菜品編號(hào) 主鍵、外鍵,參照 Dishes表 Price numeric( 7,2) Not 數(shù)字 菜品價(jià)格 與菜品對(duì)應(yīng) 表 評(píng)價(jià)表 Evaluate 數(shù)據(jù)項(xiàng)名與別名 類(lèi)型 (長(zhǎng)度 ) 是否為空 數(shù)據(jù)約束 數(shù)據(jù)項(xiàng)含義說(shuō)明 與其他數(shù)據(jù)項(xiàng)的聯(lián)系 tableNo Char( 4) Not null R 字符加 3個(gè)數(shù)字 桌臺(tái)編號(hào) 主鍵、外鍵,參照 Room 表 dishesNO Char( 7) Not null G 字符加 6個(gè)數(shù)字 菜品編號(hào) 主鍵、外鍵,參照 Dishes表 Score Int Not null 數(shù)字, 0到10 分?jǐn)?shù) 獨(dú)立 函數(shù)依賴關(guān)系: 1) 菜品表 函數(shù)依賴集為 F1={菜品編號(hào)→(菜 品名稱(chēng),菜品價(jià)格,菜品類(lèi)型,熱量,蛋白質(zhì)含量,糖分) } ∈ 3NF。 3) 顧客表 函數(shù)依賴集為 F3={顧客編號(hào)→(顧客等級(jí),顧客積分,顧客姓名,顧客性別,顧客生日) } ∈ 3NF。 5) 科學(xué)套餐表明細(xì)表 函數(shù)依賴集為 F5={套餐編號(hào)→(菜品編號(hào)) } ∈ 3NF。 7) 菜單明細(xì)表 18 函數(shù)依賴集為 F7={菜單編號(hào)→(菜品編號(hào),菜品價(jià)格,實(shí)際菜品價(jià)格,菜品數(shù)量) } ∈ 3NF。 4 數(shù)據(jù)庫(kù)應(yīng)用設(shè)計(jì) 數(shù)據(jù)庫(kù)應(yīng)用的設(shè)計(jì),包括數(shù)據(jù)庫(kù)的腳本和安全性設(shè)計(jì)、數(shù)據(jù)庫(kù)的完整性設(shè)計(jì)和數(shù)據(jù)庫(kù)的存儲(chǔ)過(guò)程設(shè)計(jì)。qiantai39。12345639。MenuDB139。qiantai39。qiantai39。customer39。12345639。MenuDB139。customer39。customer39。creat table Dishes39。[G][09][09][09][09][09][09]39。create Member39。[C][09][09][09][09][09][09][09][09]39。create table Menu39。[C][09][09][09][09][09][09][09][09]39。create table Table139。create table Smeal39。create SmealDetail39。[G][09][09][09][09][09][09]39。create MenuDetail39。[G][09][09][09][09][09][09]39。create table Evaluate39。[G][09][09][09][09][09][09]39。 1) 菜單編號(hào)的自動(dòng)生成 建立一個(gè)觸發(fā)器,實(shí)現(xiàn)菜單的編號(hào)由時(shí)間和桌臺(tái)號(hào)自動(dòng)生成, 代碼如下所示。 22 create trigger customerscore on evaluate for update as if exists(select * from deleted) begin declare tableno char(4) declare cur_evaluate scroll cursor for /*定義游標(biāo)跟蹤顧客評(píng)價(jià)表中的桌臺(tái)號(hào) */ select tableno from deleted open cur_evaluate/*打開(kāi)游標(biāo) */ begin tran/*事務(wù)開(kāi)始 */ fetch next from cur_evaluate into tableno while(fetch_status=0)/*判斷如果提取成功 */ begin /*修改評(píng)價(jià)表中的分?jǐn)?shù) */ update evaluate set score=+ from inserted d,deleted i where = and = and =tableno fetch next from cur_evaluate into tableno end mit tran/*事務(wù)提交 */ close cur_evaluate/*關(guān)閉游標(biāo) */ deallocate cur_evaluate/*釋放游標(biāo) */ end 3)菜單價(jià)格的管理 當(dāng)菜單中的菜品改變是,菜單價(jià)格根據(jù)改變的菜品進(jìn)行更新,代碼如下所示。 1) 菜品推薦 根據(jù)顧客已經(jīng)選擇的菜品的熱量和營(yíng)養(yǎng)價(jià)值,我們自菜品表中選擇出熱量相差不大于 15%以及蛋白質(zhì)含 量在 20%以內(nèi)的的菜品,代碼如下所示。 create procedure p_menusm as begin declare menuno char(12) 24 declare cur_menusum scroll cursor for select menuNo from menudetail open cur_menusum fetch next from cur_menusum into menuno while(fetch_status=0) begin update menu set menusum=* from menudetail a where =menuno fetch next from cur_menusum into menuno end close cur_menusum deallocate cur_menusum End 3) 計(jì)算客戶的積分 建立存儲(chǔ)過(guò)程,根據(jù)顧客的菜單總價(jià)計(jì)客戶的積分?jǐn)?shù),代碼如下所示。 索引存取方式,主要采用 B+樹(shù)索引方法 1) 菜品表( Dishes)的數(shù)據(jù)量很大,而且其中大多數(shù)的數(shù)據(jù)都會(huì)經(jīng)常在查詢中用到,所以根據(jù)它的特點(diǎn)建立索引。 聚簇索引方式 除 特殊說(shuō)明的表外,在其余各表主鍵上默認(rèn)地建立聚簇索引。 數(shù)據(jù)庫(kù)的存放位置 數(shù)據(jù)庫(kù)中的數(shù)據(jù)組織一個(gè) primary 文件進(jìn)行存儲(chǔ)。 set nocount on set dateformat ymd use master go if not exists(select * from syslogins where name=39。) exec sp_addlogin user01,user01 go /*create database*/ 26 if exists(select *from sysdatabases where name=39。) drop database MenuDB1 go create database MenuDB1 on primary (name=39。, filename=39。, size=1, maxsize=5, filegrowth=1) log on (name=39。, filename=39。, size=1, maxsize=5, filegrowth=1) go /*data mydatabase*/ use MenuDB1 go 附錄: [1]數(shù)據(jù)庫(kù)完整代碼如下所示。user0139。OrderDB8139。MenuDB139。f:\myWork\39。MenuDB1Log39。f:\myWork\39。qiantai39。12345639。MenuDB139。qiantai39。qiantai39。customer39。12345639。MenuDB139。customer39。customer39。creat table Dishes39。[G][09][09][09][09][09][09]39。create Member39。[C][09][09][09][09][09][09][09][09]39。create table Menu39。[C][09][09][09][09][09][09][09][09]39。create table Table139。create table Smeal39。create SmealDetail39。[G][09][09][09][09][09][09]39。create MenuDetail39。[G][09][09][09][09][09][09]39。create table Evaluate39。[G][09][09][09][09][09][09
點(diǎn)擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1