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

正文內(nèi)容

圖書管理系統(tǒng)數(shù)據(jù)庫設(shè)計-mysql實現(xiàn)-在線瀏覽

2025-05-25 23:05本頁面
  

【正文】 k_id asc)。Query OK, 0 rows affectedRecords: 0 Duplicates: 0 Warnings: 0manager::sql:create index index_mid on manager(manager_id)。Query OK, 0 rows affectedRecords: 0 Duplicates: 0 Warnings: 0 設(shè)計視圖 給出在各表上建立的視圖以及使用的語句。操作和結(jié)果:mysql create view stu_cs as select * from student where stu_pro = 39。Query OK, 0 rows affected2. 在表student, borrow和book上創(chuàng)建借書者的全面信息視圖stu_borrow:sql: create view stu_borrow as select , , , , borrow_date,adddate(borrow_date,30) expect_return_date from student, book, borrow where = and = 。Query OK, 0 rows affected:sql: create view cs_book as select * from book where in (select from book_sort where sort_id = 1)。Query OK, 0 rows affected:sql:create view stu_borrow_return asselect , , , ,from student, book, return_tablewhere = and = 。, 當(dāng)某學(xué)生借書成功后,圖書表相應(yīng)的圖書不在架上,變?yōu)?:sql: create trigger borrow after insert on borrow for each row begin update book set book_num = book_num – 1 where book_id = 。 end $$Query OK, 0 rows affected在插入表borrow之前,book_id = 1 的圖書還在架上,為1:學(xué)生1借了這本書后,在borrow中插入了一條記錄:在borrow中插入這條記錄后,book_id =1的圖書,不在架上,為0:, 還書成功后,對應(yīng)的書籍book_num變?yōu)?:sql: create trigger trigger_return after insert on return_table for each row begin update book set book_num = book_num + 1 where book_id = 。 /*調(diào)用存儲過程*/set global event_scheduler = 1。 /*開啟定時器*/操作和結(jié)果顯示:1). 學(xué)生1借了圖書1,生成借書記錄stu_borrow視圖,如下:2). 當(dāng)他在1月27日前還書時,沒有生成罰單:3). 當(dāng)他在1月27日后還書時,生成罰單:,若處罰記錄超過30條,則將這個學(xué)生的誠信級設(shè)置為0,下次不允許借書:sql: create trigger trigger_credit after insert on ticket for each row begin if (select count(*) from ticket where stu_id=)30 then update student set stu_integrity = 0 where stu_id = 。 end操作和結(jié)果顯示,測試時選擇插入ticket項大于3,因為30太大了,不容易測試:學(xué)生1超過3次超期歸還圖書后,產(chǎn)生了4條罰單:此時觸動觸發(fā)器trigger_credit,將學(xué)生1的誠信級設(shè)置為0:四、應(yīng)用程序設(shè)計與編碼實現(xiàn)系統(tǒng)實現(xiàn)中存儲函數(shù)和存儲過程的設(shè)計 要求給出功能描述和代碼。 set cur_date = currentdate。end操作和結(jié)果顯示:1). 學(xué)生1借了圖書1,生成借書記錄stu_borrow視圖,如下:2). 當(dāng)他在1月27日前還書時,沒有生成罰單:3). 當(dāng)他在1月27日后還書時,生成罰單::學(xué)生注冊信息stu_registersql: create procedure stu_register(in stu_id int, in stu_name varchar(20), in stu_sex varchar(20
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1