【正文】
畢業(yè)設(shè)計(jì)論文 軟件工程專業(yè) 游戲數(shù)據(jù)庫服務(wù)器的設(shè)計(jì)與實(shí)現(xiàn) XXX大學(xué)本科學(xué)生畢業(yè)設(shè)計(jì)網(wǎng)絡(luò)對戰(zhàn)游戲奇跡之海服務(wù)器數(shù)據(jù)庫的設(shè)計(jì)與實(shí)現(xiàn)學(xué) 生學(xué) 號20055237指導(dǎo)教師XXX 副教授助理指導(dǎo)教師專 業(yè)軟件工程XXX大學(xué)軟件學(xué)院二〇〇九年六月Ba D Project of Chongqing UniversityDesign and Implementation of Server Database for the Online Game Legendary OceanBaD Candidate XXXSupervisor A Prof Tan HuixinAssistant TutorMajor Software EngineeringCollege of Software EngineeringChongqing UniversityJune 2009摘 要隨著的普及網(wǎng)絡(luò)游戲已經(jīng)成為大家耳濡目染的新生事物現(xiàn)在可以說網(wǎng)絡(luò)游戲已經(jīng)成為人們休閑娛樂的有效方式網(wǎng)絡(luò)游戲必須依托于互聯(lián)網(wǎng)可以多人同時(shí)參與游戲通過人與人之間的互動(dòng)達(dá)到交流娛樂和休閑的目的在網(wǎng)絡(luò)游戲中數(shù)據(jù)庫主要用來保存用戶資料包括用戶注冊信息用戶游戲資料以及其他設(shè)置資料網(wǎng)絡(luò)游戲的服務(wù)器端在處理資料時(shí)必然要使用數(shù)據(jù)庫進(jìn)行大量數(shù)據(jù)的永久存儲所以在網(wǎng)絡(luò)游戲的開發(fā)中數(shù)據(jù)庫的設(shè)計(jì)也是很重要的環(huán)節(jié)本項(xiàng)目就是網(wǎng)絡(luò)游戲服務(wù)器數(shù)據(jù)庫的設(shè)計(jì)和實(shí)現(xiàn)本項(xiàng)目MySQL作為數(shù)據(jù)庫管理系統(tǒng)還使用了MySQL提供的C API該API的功能進(jìn)行連接管理實(shí)施查詢處理結(jié)果集等通過需求分析完成了數(shù)據(jù)庫的概念設(shè)計(jì)邏輯設(shè)計(jì)以及系統(tǒng)架構(gòu)設(shè)計(jì)通過系統(tǒng)架構(gòu)圖分析出了系統(tǒng)各個(gè)部分的工作情況以及數(shù)據(jù)的交互情況將C API封裝成易于使用的數(shù)據(jù)庫接口為數(shù)據(jù)庫服務(wù)器提供了操作數(shù)據(jù)庫的函數(shù)關(guān)鍵詞數(shù)據(jù)庫系統(tǒng)網(wǎng)絡(luò)游戲MySQL C API封裝ABSTRACTWith the popularization of internet online game is no longer a new thing to people Now it can be said that online games have bee an effective way of the peoples leisure and entertainment Online games must rely on the internet people can take part in the game at the same time and through the interaction between people to reach the purposes of exchange entertainment and leisureIn online games the database is mainly used to save users data including users registration information users game information as well as other setting information When online games serverside in dealing these data the database must be used to store large amounts of data permanent so database designing is also a very important aspect in the development of online gamesThis project is about design and implementation of server database for online game This project uses the database management system based on MySQL also uses the MySQL C API and this API functions can do connection management the implementation of inquiries processing of result sets and so on In the project design process the work pleted as followsThrough the requirement analysis we plete the concept and logic design of database and system architecture designThrough the system architecture diagram we analyze the work of the various parts of the system and the data interactive situationsPackaged the C API as easytouse database interfaceProvided functions for the database server operating the databaseKeywords database system online game MySQL C API Packag目 錄摘 要 IABSTRACT II1 緒 論 111 課題研究背景 112 課題研究意義 22 系統(tǒng)需求分析 421 需求概述 422 數(shù)據(jù)庫系統(tǒng)需求 423 用戶用例分析 53 系統(tǒng)設(shè)計(jì) 831 MySQL概述 832 數(shù)據(jù)庫概念設(shè)計(jì) 833 數(shù)據(jù)庫邏輯設(shè)計(jì) 144 系統(tǒng)難點(diǎn)技術(shù)分析與設(shè)計(jì) 1941 系統(tǒng)架構(gòu)設(shè)計(jì)與分析 1942 將MySQL C API封裝成易于使用的數(shù)據(jù)庫接口 27 MySQL C API 概述 27 封裝C API 295 系統(tǒng)實(shí)現(xiàn) 336 工作總結(jié)和結(jié)論 36致 謝 37參 考 文 獻(xiàn) 381 緒 論11 課題研究背景隨著的普及網(wǎng)絡(luò)游戲已經(jīng)成為大家耳濡目染的新生事物網(wǎng)絡(luò)游戲從出現(xiàn)到現(xiàn)在發(fā)展的時(shí)間很短但是起發(fā)展速度卻非常之快現(xiàn)在可以說網(wǎng)絡(luò)游戲已經(jīng)成為人們休閑娛樂的有效方式網(wǎng)絡(luò)游戲必須依托于互聯(lián)網(wǎng)進(jìn)行可以多人同時(shí)參與的游戲通過人與人之間的互動(dòng)達(dá)到交流娛樂和休閑的目的一般的網(wǎng)絡(luò)游戲都是采用客戶服務(wù)器模式的體系結(jié)構(gòu)見圖11包括客戶機(jī)程序服務(wù)器程序數(shù)據(jù)庫服務(wù)器圖11 網(wǎng)絡(luò)游戲體系結(jié)構(gòu)網(wǎng)絡(luò)游戲都是采用如下的方式運(yùn)行有一個(gè)或多個(gè)游戲服務(wù)器啟動(dòng)特定游戲服務(wù)游戲者到游戲網(wǎng)站下載客戶端程序并且申請游戲賬號ID然后啟動(dòng)客戶端程序通過網(wǎng)絡(luò)協(xié)議連接游戲服務(wù)器客戶端程序負(fù)責(zé)處理客戶端顯示和操作界面具有簡單的邏輯處理功能同時(shí)負(fù)責(zé)接收發(fā)送與服務(wù)器端交互的數(shù)據(jù)包服務(wù)器程序負(fù)責(zé)處理服務(wù)器端邏輯游戲邏輯客戶之間的網(wǎng)絡(luò)信息傳遞以及數(shù)據(jù)庫之間的數(shù)據(jù)讀取保存工作同時(shí)服務(wù)器端還要承擔(dān)客戶端數(shù)據(jù)的接受轉(zhuǎn)發(fā)工作網(wǎng)絡(luò)游戲