景點(diǎn)門票銷售管理系統(tǒng)數(shù)據(jù)庫設(shè)計(jì)_第1頁
景點(diǎn)門票銷售管理系統(tǒng)數(shù)據(jù)庫設(shè)計(jì)_第2頁
景點(diǎn)門票銷售管理系統(tǒng)數(shù)據(jù)庫設(shè)計(jì)_第3頁
景點(diǎn)門票銷售管理系統(tǒng)數(shù)據(jù)庫設(shè)計(jì)_第4頁
景點(diǎn)門票銷售管理系統(tǒng)數(shù)據(jù)庫設(shè)計(jì)_第5頁
已閱讀5頁,還剩8頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

景點(diǎn)門票銷售管理系統(tǒng)

數(shù)據(jù)庫設(shè)計(jì)學(xué)生姓名:李丙崇學(xué)號(hào):—2010508009學(xué)生姓名:一任欣月學(xué)號(hào):2010508041—專業(yè):計(jì)算機(jī)科學(xué)與技術(shù)指導(dǎo)老師:于寶華目錄TOC\o"1-5"\h\z\o"CurrentDocument"1引言3\o"CurrentDocument"1.1編寫目的3\o"CurrentDocument"1?2背景3\o"CurrentDocument"1.3參考資料32需求分析42。1目標(biāo)4\o"CurrentDocument"2.2運(yùn)算壞境4\o"CurrentDocument"2.3需求概述4\o"CurrentDocument"3結(jié)構(gòu)設(shè)計(jì)5\o"CurrentDocument"3?1邏輯結(jié)構(gòu)設(shè)計(jì)53。1。1局部E-R圖53。1。2全局E-R圖63.1。3關(guān)系模式73.1.1關(guān)系圖8\o"CurrentDocument"3.2物理結(jié)構(gòu)設(shè)計(jì)84。存儲(chǔ)過程10\o"CurrentDocument"4。1統(tǒng)計(jì)指定日期的門票銷售情況10\o"CurrentDocument"4.2統(tǒng)計(jì)指定月份的門票銷售情況10\o"CurrentDocument"4。3統(tǒng)計(jì)指定日期各種價(jià)格的門票銷售情況11\o"CurrentDocument"4。3統(tǒng)計(jì)指定營業(yè)員指定日期的收費(fèi)情況12\o"CurrentDocument"5觸發(fā)器13\o"CurrentDocument"6完整性約束15\o"CurrentDocument"7.數(shù)據(jù)庫備份161引言隨著全球信息化的發(fā)展,我們也步入信息時(shí)代,各類管理也更加系統(tǒng)化,公司利用管理信息系統(tǒng)來管理各類業(yè)務(wù)已經(jīng)非常普遍。各類系統(tǒng)也相應(yīng)的得到飛速發(fā)展,為了讓我們的管理更加系統(tǒng),更加清晰,更加科學(xué),從而也開發(fā)了一個(gè)簡單,易操作的管理管理系統(tǒng).1。1編寫目的根據(jù)門票銷售管理的特點(diǎn),對(duì)被開發(fā)軟件系統(tǒng)的主要功能、性能進(jìn)行完整描述,為軟件開發(fā)進(jìn)行詳細(xì)設(shè)計(jì)和編程提供基礎(chǔ).為軟件提供測(cè)試和驗(yàn)收的依據(jù),即為選取測(cè)試用例和進(jìn)行驗(yàn)收的依據(jù)。1。2背景該軟件系統(tǒng)的名稱:門票管理信息系統(tǒng);本項(xiàng)目的任務(wù)提出者:石河子大學(xué)本項(xiàng)目的開發(fā)者:李丙崇,任欣月本項(xiàng)目用戶:景點(diǎn)門票銷售部1。3參考資料[1]王珊,薩師煊.數(shù)據(jù)庫系統(tǒng)概論】M].高等教育出版社,2006年5月第4版[2]鄭人杰,馬素霞,殷人昆.軟件工程概率[M]。機(jī)械工業(yè)出版社,2009年11月[3]馬曉梅。SQLServer實(shí)驗(yàn)指導(dǎo)[M]。清華大學(xué)出版社,2009年9月第3版2需求分析2。1目標(biāo)這個(gè)門票管理系統(tǒng)主要是處理旅客買票,訂票,退票,以及各類查詢結(jié)算。該系統(tǒng)針對(duì)的用戶是門票銷售部門,由于門票銷售,查詢以及計(jì)算各天或者不同時(shí)間段的收入比較繁瑣,此系統(tǒng)方便簡單的實(shí)現(xiàn)了這些功能,使得管理員與職工方便很多,讓這個(gè)門票銷售都變得條條有理.2.2運(yùn)算壞境(1)軟件資源服務(wù)器端軟件選擇的具體說明:操作系統(tǒng):Windows2007Server或WindowsXP.數(shù)據(jù)庫管理系統(tǒng):SQLServer.開發(fā)工具:visualstudio2008.軟件平臺(tái):windows+iis+mssql.客戶端軟件選擇的具體說明:web瀏覽器。2。3需求概述本系統(tǒng)的開發(fā)是為了提高門票銷售以及管理的效率,盡可能杜絕各個(gè)銷售環(huán)節(jié)中可能出現(xiàn)的資金流失不明現(xiàn)象,滿足系統(tǒng)化的門票管理域收入需求。系統(tǒng)功能主要包括:登陸管理(包括管理員登陸以及職工登陸,職工注冊(cè)情況),系統(tǒng)管理(系統(tǒng)啟用,及其系統(tǒng)截止),直接銷售(個(gè)人購買與團(tuán)購),訂票管理(訂票與查看訂票狀態(tài)),退票管理(處理當(dāng)天所要退的票),查詢管理(按時(shí)間查詢,按職工號(hào)查詢,游客種類查詢,按時(shí)間票號(hào)查詢,按時(shí)間,職工號(hào)查詢,按時(shí)間,游客種類查詢,以及當(dāng)天銷售查詢),結(jié)算管理(具體時(shí)間查詢以及時(shí)間段查詢),最后是系統(tǒng)簡介.3結(jié)構(gòu)設(shè)計(jì)3。1邏輯結(jié)構(gòu)設(shè)計(jì)3。1.1局部E-R圖圖4.營業(yè)員E-R圖圖6.門票E-R圖圖7.門票類型E-R圖3。1。2全局E—R圖1圖8總體E-R圖3.1.3關(guān)系模式Admin_T(Selloperator,User_name,password,Sex,Realname,Cardnumber,Age,Phone,User_type)該表為管理表,表項(xiàng)包括銷售營業(yè)員,用戶姓名,密碼,性別,真實(shí)姓名,卡號(hào),年齡,電話號(hào)碼,用戶類型的信息。主鍵為銷售營業(yè)員。Dd_T(OrderID,Custom_ID,Ticker_ID,Ticker_type,Ticker_Price,Sell_operator__,Sell_date,Sell_month)該表為訂單表,表項(xiàng)有訂單號(hào),游客號(hào),門票號(hào),門票類型,門票價(jià)格,銷售營業(yè)員,銷售日期和銷售月份.該表的主鍵為訂單號(hào),外鍵有游客號(hào),門票號(hào),門票類型,門票價(jià)格和銷售營業(yè)員.Custom_T(CustomID,Customname,Sex,Age,Cardnumber,Customtype,Custom_phone)該表為游客信息表,表項(xiàng)有游客號(hào),游客姓名,身份證號(hào),游客類型,游客電話.該表主鍵為游客號(hào),無外鍵。Ticket_summary(SellID,Ticket_type,Sell_amount,Sell_money,Sell_month)該表為門票信息統(tǒng)計(jì)表,表項(xiàng)有出售號(hào)碼,門票類型,出售時(shí)間,出售月份,出售價(jià)格。該表主鍵為出售號(hào),外鍵為門票類型。Ticket_T(Tickettype,Tickettypename,Ticketprice,TicketCount,Ticket_comment,Date)該表為門票信息表,表項(xiàng)有門票類型,類型名,門票價(jià)格,門票數(shù)量,日期。主鍵為門票類型,無外鍵。Ticket_List(TicketID,Ticket_type,Sell_flag)該表為門票屬性信息表,表項(xiàng)為門票號(hào),門票類型,和是否出售標(biāo)記.主鍵為門票號(hào),外鍵為門票類型。TJdcet_siimmary7?Sfill_IDTicket,typeSell_diSiteSsll_amountStll_moneySell_montiTJdcet_siimmary7?Sfill_IDTicket,typeSell_diSiteSsll_amountStll_moneySell_montiTicket_T7?Fuk巴七Ti匚ku口己_n曰rnTickel^_FriceTic.kel_CountTicket_CQmmentDafe±rteket_List

畝TicketJDTickeiL_tyre5ril_iagAdmin_T*Seli_cp€iatarUser_namePafiSMvorclSmRealrameCardnumberAgePhoneUBQrJwedd^r9Order_]DCustomJDTlcket^IDTlcket_trt>eTlckct_PrteSell_opeFalDr-Sell_dateSeli__mon1h■:-:-Custotn_T7Cuetom_[DCXistaim_nameSewAgeCardnumber-cxistaim_r¥peCuelDm_phone3。2物理結(jié)構(gòu)設(shè)計(jì)表1Admin_T表列名數(shù)據(jù)類型允許空Sell_operatornvarchar(10)NONULLUser_namevarchar(20)NONULLPasswordvarchar(20)NONULLSexchar(5)NULLRealnamevarchar(20)NULLcardnumberchar(18)NULLAgeintNULLPhonechar(11)NULLUser_typechar(10)NULL表2Custom_T表列名數(shù)據(jù)類型允許空Custom_IDchar(10)NONULLCustom_namevarchar(20)NONULLSexchar(5)NULLAgeintNULLCardnumberchar(18)NULLCustom_typechar(10)NULLCustom_phonechar(11)NULL

表3dd_T表列名數(shù)據(jù)類型允許空Order_IDchar(10)NONULLCustom_IDchar(10)NONULLTicket_IDchar(17)NONULLTicket_typechar(3)NONULLTicket_Pricedecimal(5,2)NONULLSell_operatornvarchar(10)NONULLSell_datedatetimeNONULLSell_monthnvarchar(10)NONULL表4Ticket_List表列名數(shù)據(jù)類型允許空Ticket_IDchar(17)NONULLTicket_typechar(3)NULLSell_flagintNULL表5Ticket_summary表列名數(shù)據(jù)類型允許空Sell_IDchar(20)NONULLTicket_typechar(3)NONULLSell_datedatetimeNULLSell_amountintNULLSell_moneydecimal(5,2)NULLSell_monthnvarchar(10)NULL表6Ticket_T表列名數(shù)據(jù)類型允許空Ticket_typechar(3)NULLTicket_type_namechar(50)NULLTicket_pricedecimal(5,2)NONULLTicket_CountintNONULLTicket_commentchar(200)NONULLDatedatetimeNONULL4。存儲(chǔ)過程4.1統(tǒng)計(jì)指定日期的門票銷售情況createProcedurePro_QTicsinf@starttimedatetime,@endtimedatetime,@sSell_amount_outintoutput,@sSell_money_outdecimal(5,2)outputASselect@sSell_amount_out=count(Ticket_ID),@sSell_money_out=sum(dd_T.Ticket_Price)fromdd_T,Ticket_TwhereTicket_T。Ticket_type=dd_T.Ticket_typeandSell_datebetween@starttimeand@endtimedeclare@starttimedatetime,@endtimedatetime,@sSell_amount_outint,@sSell_money_outdecimal(5,2)select@starttime='2013/1/1300:00:00'select@endtime='2013/1/1319:40:00’execPro_QTicsinf@starttime,@endtime,@sSell_amount_outoutput,@sSell_money_outoutputselect@sSell_amount_outas門票數(shù)量,@sSell_money_outas金額4。2統(tǒng)計(jì)指定月份的門票銷售情況createProcedurePro_QTicsminf@sSell_monthnvarchar(10),@sSell_amount_outintoutput,@sSell_money_outdecimal(5,2)outputASselect@sSell_amount_out=count(Ticket_ID),@sSell_money_out=sum(dd_T.Ticket_Price)fromdd_T,Ticket_TwhereTicket_T。Ticket_type=dd_T.Ticket_typeandSell_month=@sSell_monthdeclare@sSell_monthnvarchar(10),@sSell_amount_outint,@sSell_money_outdecimal(5,2)select@sSell_month='2013/1'execPro_QTicsminf@sSell_month,@sSell_amount_outoutput,@sSell_money_outoutputselect@sSell_amount_outas門票數(shù)量,@sSell_money_outas金額4。3統(tǒng)計(jì)指定日期各種價(jià)格的門票銷售情況createProcedurePro_QTicsPinf@starttimedatetime,@endtimedatetime,@sTicket_typechar(3),@sTicket_Price_outdecimal(5,2)output,@sSell_amount_outintoutput,@sSell_money_outdecimal(5,2)outputASselect@sTicket_Price_out=Ticket_Price,@sSell_amount_out=count(Ticket_ID),@sSell_money_out=sum(dd_T。Ticket_Price)fromdd_Twhere@sTicket_type=dd_T.Ticket_typeandSell_datebetween@starttimeand@endtimegroupbyTicket_Pricedeclare@starttimedatetime,@endtimedatetime,@sTicket_typechar(3),@sTicket_Price_outdecimal(5,2),@sSell_amount_outint,@sSell_money_outdecimal(5,2)select@starttime=’2013/1/1300:00:00'select@endtime=’2013/1/1319:40:00’select@sTicket_type='T01’execPro_QTicsPinf@starttime,@endtime,@sTicket_type,@sTicket_Price_outoutput,@sSell_amount_outoutput,@sSell_money_outoutputselect@sTicket_Price_outas門票價(jià)格,@sSell_amount_outas門票數(shù)量,@sSell_money_outas門票金額select@sTicket_type=’T02'execPro_QTicsPinf@starttime,@endtime,@sTicket_type,@sTicket_Price_outoutput,@sSell_amount_outoutput,@sSell_money_outoutputselect@sTicket_Price_outas門票價(jià)格,@sSell_amount_outas門票數(shù)量,@sSell_money_outas門票金額select@sTicket_type='T03'execPro_QTicsPinf@starttime,@endtime,@sTicket_type,@sTicket_Price_outoutput,@sSell_amount_outoutput,@sSell_money_outoutputselect@sTicket_Price_outas門票價(jià)格,@sSell_amount_outas門票數(shù)量,@sSell_money_outas門票金額4.3統(tǒng)計(jì)指定營業(yè)員指定日期的收費(fèi)情況createProcedurePro_QTicsCinf@starttimedatetime,@endtimedatetime,@sSell_operatornvarchar(10),@sSell_amount_outintoutput,@sSell_money_outdecimal(5,2)outputASselect@sSell_amount_out=count(Ticket_ID),@sSell_money_out=sum(dd_T.Ticket_Price)fromdd_Twhere@sSell_operator=dd_T.Sell_operatorandSell_datebetween@starttimeand@endtimegroupbySell_operatordeclare@starttimedatetime,@endtimedatetime,@sSell_operatornvarchar(10),@sSell_amount_outint,@sSell_money_outdecimal(5,2)select@starttime=’2013/1/1300:00:00'select@endtime=’2013/1/1323:40:00'select@sSell_operator=001execPro_QTicsCinf@starttime,@endtime,@sSell_operator,@sSell_amount_outoutput,@sSell_money_outoutputselect@sSell_operatoras營業(yè)員,@sSell_amount_outas銷售門票數(shù)量,@sSell_money_outas收費(fèi)總金額select@sSell_operator='002’execPro_QTicsCinf@starttime,@endtime,@sSell_operator,@sSell_amount_outoutput,@sSell_money_outoutputselect@sSell_operatoras營業(yè)員,@sSell_amount_outas銷售門票數(shù)量,@sSell_money_outas收費(fèi)總金額5觸發(fā)器a。有人買票時(shí),自動(dòng)更改門票標(biāo)志位createtriggerTRIGGER_BUY_TICondd_TforinsertasbeginDeclare@Ticket_ID_INchar(17)Select@Ticket_ID_IN=Ticket_IDfrominsertedupdateTicket_ListsetSell_flag=1whereTicket_ID=@Ticket_ID_INendinsertintodd_Tvalues('O006','1005','S0006',‘T02',40,'001','2013/2/1319:50:00','2013/2')若有人退票,對(duì)各表所有有關(guān)該人的信息進(jìn)行級(jí)聯(lián)刪除createtriggerTRiGGER_EXIT_TICondd_TfordeleteasbeginDeclare@Order_ID_DELchar(10),@Custom_ID_DELchar(10),@Ticket_ID_ALTchar(17)Select@Order_ID_DEL=Order_ID,@Custom_ID_DEL=Custom_ID,@Ticket_ID_ALT=Ticket_IDfromdeletedupdateTicket_ListsetSell_flag=0whereTicket_ID=@Ticket_ID_ALTdeletefromCustom_TwhereCustom_ID=@Custom_ID_DELendgoDELETEfromdd_TwhereOrder_ID='O006'c。當(dāng)門票銷售時(shí)自動(dòng)減少該該類型門票的總量createtriggertri_Tic_SellonTicket_summaryforinsertasdeclare@oldcountint,@newcountint,@sTicket_typechar(3)select@sTicket_type=Ticket_type,@newcount=Sell_amountfrominsertedselect@oldcount二Ticket_CountfromTicket_TwhereTicket_type=@sTicket_typeif@newcount〉0and@oldcount>0beginupdateTicket_TsetTicket_Count=@oldcount-@newcountwhereTicket_type=@sTicket_typereturnendrollbacktransactioninsertintoTicket_summaryvalues('C0004','T01','2013一01一1718:47','002',2,40,’2013—01’)當(dāng)門票修改類型時(shí)自動(dòng)修改門票各類型的數(shù)量createtriggertri_TicxgonTicket_Listforupdateasdeclare@sTic_IDchar(17),@sTicket_typechar(3),@saTicket_typechar(3),@scountint,@sacountintselect@sTicket_type=Ticket_type,@sTic_ID=Ticket_IDfrominsertedselect@saTicket_type=Ticket_typefromTicket_ListwhereTicket_ID=@sTic_IDselect@scount=Ticket_CountfromTicket_TwhereTicket_type=@sTicket_typeselect@sacount=Ticket_CountfromTicket_TwhereTicket_type=@saTicket_typebeginupdateTicket_TsetTicket_Count=@scount+1whereTicket_type=@sTicket_typereturnupdateTicket_TsetTicket_COunt=@sacount一1whereTicket_ty

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論