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

正文內(nèi)容

銷售訂單數(shù)據(jù)庫(kù)管理系統(tǒng)(存儲(chǔ)版)

  

【正文】 supplier_no varchar(12)not null, product_no varchar(12)not null, sp_amount smallint not null, rest_product smallint not null, primary key(supplier_no,product_no), foreign key(supplier_no)references supplier(supplier_no) on delete cascade on update cascade, foreign key(product_no)references product(product_no) on delete cascade on update cascade)。這次課程設(shè)計(jì)讓我收獲很多,首先是思維方式,之前想得國(guó)語(yǔ)簡(jiǎn)單,以至于發(fā)現(xiàn)無法完成功能,是因?yàn)樗季S方式的局限性,沒有站在多角度看問題。exec pro_insert_supplier ‘1009’,’海爾’,’中國(guó)’,’18774871311’。exec pro_insert_supplier ‘1001’,’英國(guó)石油’,’英國(guó)’,’18774871311’。產(chǎn)品表 表[3][sp 表](供應(yīng)關(guān)系表)表 表名 sp(供應(yīng)關(guān)系表)數(shù)據(jù)庫(kù)用戶 sa主鍵 supplier_no,product_no其他排序字段 無索引字段 無序號(hào) 字段名稱 數(shù)據(jù)類型(精度范圍)允許為空Y/N唯一Y/N區(qū)別度 默認(rèn)值 約束條件/說明1 supplier_no char(12) N N 低 無 主鍵 /供應(yīng)商號(hào)2 product_no char(12) N N 低 無 主鍵 /產(chǎn)品編號(hào)3 sp_amount smallint N N 低 無 銷售量4 rest_product smallint N N 低 無 庫(kù)存量12sql 腳本 create table sp( supplier_no varchar(12)not null,product_no varchar(12)not null,sp_amount smallint not null,rest_product smallint not null,primary key(supplier_no,product_no),foreign key(supplier_no)references supplier(supplier_no)on delete cascadeon update cascade,foreign key(product_no)references product(product_no)on delete cascadeon update cascade)。(2)刪除操作:此銷售訂單數(shù)據(jù)庫(kù)管理系統(tǒng)能夠刪除供應(yīng)商數(shù)據(jù),能夠刪除產(chǎn)品數(shù)據(jù),能夠刪除客戶信息,能夠刪除雇員信息,能夠進(jìn)行退訂操作刪除訂單信息。設(shè)計(jì)該數(shù)據(jù)庫(kù)的目的是為了能夠模擬完成一次訂單銷售流程。提示:本部分完成此數(shù)據(jù)庫(kù)系統(tǒng)的業(yè)務(wù)描述,例如:(1)數(shù)據(jù)庫(kù)系統(tǒng)創(chuàng)建的背景(2)數(shù)據(jù)庫(kù)系統(tǒng)要完成的業(yè)務(wù)流程及工作內(nèi)容(3)揭示該數(shù)據(jù)庫(kù)的資源需求和設(shè)計(jì)約束 需求分析數(shù)據(jù)要求及數(shù)據(jù)關(guān)系(1)數(shù)據(jù)結(jié)構(gòu):此銷售訂單數(shù)據(jù)庫(kù)管理系統(tǒng)包括供應(yīng)商、產(chǎn)品、客戶、雇員 4 個(gè)實(shí)體。編寫要求:(1)此銷售訂單數(shù)據(jù)庫(kù)管理系統(tǒng)全部使用 sql 語(yǔ)句編寫;(2)增刪改查及下訂單退訂等操作通過存儲(chǔ)過程來實(shí)現(xiàn),定義級(jí)聯(lián)刪除約束,下訂單及退訂使用到觸發(fā)器,實(shí)現(xiàn)并發(fā)操作。訂單細(xì)則表 表[6][eployee 表](雇員表)表 表名 eployee(雇員表)數(shù)據(jù)庫(kù)用戶 sa主鍵 employee_no其他排序字段 無索引字段 無序號(hào) 字段名稱 數(shù)據(jù)類型(精度范圍)允許為空Y/N唯一Y/N區(qū)別度 默認(rèn)值 約束條件/說明1 employee_nochar(12) N Y 高 無 主鍵/雇員號(hào)2 employee_namechar(20) N N 中 無 雇員名稱3 employee_phonesmallint N Y 高 無 雇員電話4 employee_salarysmallint N N 低 無 雇員工資15sql 腳本 create table employee( employee_no varchar(12)primary key,employee_name varchar(20)not null,employee_phone varchar(12)not null,employee_salary smallint not null,supplier_no char(12),foreign key(supplier_no)references supplier(supplier_no)on delete cascadeon update cascade)。exec pro_insert_supplier ‘1004’,’通用汽車’,’德國(guó)’,’18774871311’。圖 圖 查詢訂單細(xì)則信息功能:查詢訂單細(xì)則信息目的:存儲(chǔ)查詢訂單細(xì)則信息的操作意義:下次重復(fù)同樣的動(dòng)作時(shí),可直接執(zhí)行存儲(chǔ)過程,簡(jiǎn)化操作步驟create procedure pro_select_epc_detailedorder_no varchar(6)asselect * from epc_detailed?,F(xiàn)在一般都不會(huì)出現(xiàn)低級(jí)錯(cuò)誤了。客戶表create table epc( order_no varchar(6)primary key, order_time varchar(20)not null, customer_no varchar(12)not null, employee_no varchar(12)not null, foreign key(employee_no)references employee(employee_no) on delete cascade on update cascade, foreign key(customer_no)references customer(customer_no) on delete cascade on update cascade)。供應(yīng)商表create table product( product_no varchar(12)primary key, product_name varchar(20)not null, product_family varchar(20)not null, product_price smallint not null )。 退訂 圖 22圖 觸發(fā)器功能:并發(fā)操作目的:減少庫(kù)存,增加銷售量意義:可并發(fā)執(zhí)行,自動(dòng)增加銷售量,減少庫(kù)存量刪除觸發(fā)器create trigger tri_deleteon epc_detailedafter deleteas update spset rest_product=rest_product+(select order_amount from deleted),sp_amount=sp_amount(select order_amount from deleted)from deleted,spwhere = and =插入觸發(fā)器create trigger tri_inserton epc_detailedafter insert as update spset rest_product=rest_product(select order_amount from inserted),sp_amount=sp_amount+(select order_amount from inserted)from sp,insertedwhere = and =23圖 圖 圖 247.總結(jié)經(jīng)過了艱難的兩個(gè)星期,終于把這個(gè)訂單銷售管理系統(tǒng)做好了。exec pro_insert_supplier ‘1008’,’通用電氣’,’德國(guó)’,’18774871311’。Create view customer_viweasselect supplier_no,sum(sp_amount)’產(chǎn)品總銷售量’from spgroup by supplier_no17圖 建立一張雇員查詢視圖目的:供雇員查詢功能:供雇員查詢 意義:能夠看到所有雇員信息及所在供應(yīng)商create view employee_viweasselect employee_no,employee_name,employee_phone,supplier_namefrom employee,supplierwhere =圖 存儲(chǔ)過程、函數(shù)及觸發(fā)器的設(shè)計(jì) 插入供應(yīng)商信息插入供應(yīng)商信息功能:插入供應(yīng)商信息目的:存儲(chǔ)查詢插入供應(yīng)
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1