Cassandra數(shù)據(jù)庫(kù)遷移工具設(shè)計(jì)與實(shí)現(xiàn)
發(fā)布時(shí)間:2018-01-26 06:04
本文關(guān)鍵詞: 數(shù)據(jù)庫(kù)遷移工具 Cassandra數(shù)據(jù)庫(kù) Maven 出處:《華南理工大學(xué)》2015年碩士論文 論文類型:學(xué)位論文
【摘要】:當(dāng)今社會(huì),大多數(shù)應(yīng)用程序都是需要管理大量數(shù)據(jù)的企業(yè)應(yīng)用程序。從事這類項(xiàng)目的開發(fā)團(tuán)隊(duì)常常將數(shù)據(jù)庫(kù)視為與應(yīng)用程序完全脫離的單獨(dú)實(shí)體。造成這種現(xiàn)象的原因是組織結(jié)構(gòu)經(jīng)常將數(shù)據(jù)庫(kù)團(tuán)隊(duì)從應(yīng)用程序開發(fā)團(tuán)隊(duì)分離出來(lái)。這種分離導(dǎo)致了一定的問(wèn)題:需要手工變更數(shù)據(jù)庫(kù),不能與團(tuán)隊(duì)的其他成員分享數(shù)據(jù)庫(kù)變更,不同的人可能使用不一致的方法變更數(shù)據(jù)庫(kù)或數(shù)據(jù),數(shù)據(jù)庫(kù)版本之間變更的手工管理方法效率低下,使開發(fā)人員無(wú)法與數(shù)據(jù)變更保持同步。而且,還可能使應(yīng)用程序的用戶遇到與數(shù)據(jù)不一致和數(shù)據(jù)損壞等問(wèn)題。鑒于手工遷移數(shù)據(jù)庫(kù)的問(wèn)題,企業(yè)更傾向于使用自動(dòng)化遷移工具來(lái)完成數(shù)據(jù)庫(kù)的遷移,但是目前存在的絕大多數(shù)此類工具都是面向于傳統(tǒng)的關(guān)系型數(shù)據(jù)庫(kù),對(duì)于新型的Nosql,如我們公司所使用的Cassandra,并沒(méi)有太多的選擇。本文介紹一款用于Cassandra的自動(dòng)化數(shù)據(jù)庫(kù)遷移工具的設(shè)計(jì)。該工具的目標(biāo)是對(duì)指定的目錄下的CQL腳本和JAVA腳本進(jìn)行分析,檢測(cè)哪些腳本已執(zhí)行或未執(zhí)行,然后生成一個(gè)執(zhí)行任務(wù)列表。根據(jù)該執(zhí)行列表上的任務(wù)執(zhí)行腳本,在執(zhí)行過(guò)程中記錄執(zhí)行日志,便于開發(fā)者后來(lái)進(jìn)行調(diào)試,并將執(zhí)行過(guò)程中的狀態(tài)記錄在數(shù)據(jù)庫(kù)的一張名為VersionTable表中。該工具采用Java語(yǔ)言編寫,使用Maven作為項(xiàng)目管理工具來(lái)完成自動(dòng)化部署工作。通過(guò)Maven的本地化配置,企業(yè)現(xiàn)有的平臺(tái)能夠很好的使用該工具。經(jīng)過(guò)測(cè)試,在使用該數(shù)據(jù)庫(kù)遷移工具后,企業(yè)的開發(fā)人員能夠清楚數(shù)據(jù)庫(kù)的狀態(tài),知道哪些腳本已經(jīng)執(zhí)行,并可根據(jù)執(zhí)行日志來(lái)修正腳本中的語(yǔ)法錯(cuò)誤,大大提高了生產(chǎn)效率。
[Abstract]:In today's society. Most applications are enterprise applications that need to manage large amounts of data. Development teams working on such projects often treat databases as separate entities completely separate from the application. This is due to groups. Weaving structures often separate database teams from application development teams. This separation leads to problems:. The database needs to be changed manually. Database changes cannot be shared with other members of the team, different people may use inconsistent methods to change databases or data, and manual management of changes between database versions is inefficient. Prevents developers from keeping pace with data changes. Also, it is possible to expose application users to problems such as data inconsistency and data corruption, given the problem of manually migrating the database. Enterprises prefer to use automated migration tools to complete database migration, but most of these tools are oriented to the traditional relational database, for the new Nosql. Like the Cassandra used by our company. This article introduces the design of an automated database migration tool for Cassandra. The goal of the tool is to implement CQL and JAVA scripts in a specified directory. Analysis. Detect which scripts have been executed or not executed, and then generate a list of execution tasks. According to the task execution script on the execution list, the execution log is recorded during execution so that the developer can debug it later. And the state of the execution is recorded in a database named VersionTable table. The tool is written in Java language. Use Maven as the project management tool to complete the automated deployment. Through the localized configuration of Maven, the existing platform of the enterprise can make good use of the tool. After using the database migration tool, enterprise developers are able to know the state of the database, which scripts have been executed, and correct syntax errors in scripts based on the execution log. The production efficiency is greatly improved.
【學(xué)位授予單位】:華南理工大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2015
【分類號(hào)】:TP311.13
【參考文獻(xiàn)】
相關(guān)期刊論文 前4條
1 黃賢立;;NoSQL非關(guān)系型數(shù)據(jù)庫(kù)的發(fā)展及應(yīng)用初探[J];福建電腦;2010年07期
2 夏文忠;;Log4J在學(xué)生管理系統(tǒng)中的開發(fā)與應(yīng)用[J];電腦編程技巧與維護(hù);2009年10期
3 羅林球;孟琦;李曉;蘇國(guó)平;張澄澈;;異構(gòu)數(shù)據(jù)庫(kù)遷移的設(shè)計(jì)和實(shí)現(xiàn)[J];計(jì)算機(jī)應(yīng)用研究;2006年12期
4 張俊;;用Maven簡(jiǎn)化你的項(xiàng)目管理[J];程序員;2006年09期
,本文編號(hào):1464885
本文鏈接:http://www.wukwdryxk.cn/guanlilunwen/xiangmuguanli/1464885.html
最近更新
教材專著