Cassandra數據庫遷移工具設計與實現
發布時間:2018-01-26 06:04
本文關鍵詞: 數據庫遷移工具 Cassandra數據庫 Maven 出處:《華南理工大學》2015年碩士論文 論文類型:學位論文
【摘要】:當今社會,大多數應用程序都是需要管理大量數據的企業應用程序。從事這類項目的開發團隊常常將數據庫視為與應用程序完全脫離的單獨實體。造成這種現象的原因是組織結構經常將數據庫團隊從應用程序開發團隊分離出來。這種分離導致了一定的問題:需要手工變更數據庫,不能與團隊的其他成員分享數據庫變更,不同的人可能使用不一致的方法變更數據庫或數據,數據庫版本之間變更的手工管理方法效率低下,使開發人員無法與數據變更保持同步。而且,還可能使應用程序的用戶遇到與數據不一致和數據損壞等問題。鑒于手工遷移數據庫的問題,企業更傾向于使用自動化遷移工具來完成數據庫的遷移,但是目前存在的絕大多數此類工具都是面向于傳統的關系型數據庫,對于新型的Nosql,如我們公司所使用的Cassandra,并沒有太多的選擇。本文介紹一款用于Cassandra的自動化數據庫遷移工具的設計。該工具的目標是對指定的目錄下的CQL腳本和JAVA腳本進行分析,檢測哪些腳本已執行或未執行,然后生成一個執行任務列表。根據該執行列表上的任務執行腳本,在執行過程中記錄執行日志,便于開發者后來進行調試,并將執行過程中的狀態記錄在數據庫的一張名為VersionTable表中。該工具采用Java語言編寫,使用Maven作為項目管理工具來完成自動化部署工作。通過Maven的本地化配置,企業現有的平臺能夠很好的使用該工具。經過測試,在使用該數據庫遷移工具后,企業的開發人員能夠清楚數據庫的狀態,知道哪些腳本已經執行,并可根據執行日志來修正腳本中的語法錯誤,大大提高了生產效率。
[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.
【學位授予單位】:華南理工大學
【學位級別】:碩士
【學位授予年份】:2015
【分類號】:TP311.13
【參考文獻】
相關期刊論文 前4條
1 黃賢立;;NoSQL非關系型數據庫的發展及應用初探[J];福建電腦;2010年07期
2 夏文忠;;Log4J在學生管理系統中的開發與應用[J];電腦編程技巧與維護;2009年10期
3 羅林球;孟琦;李曉;蘇國平;張澄澈;;異構數據庫遷移的設計和實現[J];計算機應用研究;2006年12期
4 張俊;;用Maven簡化你的項目管理[J];程序員;2006年09期
,本文編號:1464885
本文鏈接:http://www.malleg.cn/guanlilunwen/xiangmuguanli/1464885.html

