跳到主要內容

簡易檢索 / 詳目顯示

研究生: 周榆澤
論文名稱: 以關聯式代數設計多租戶應用程式之SQL轉換規則
Design and Implementation of SQL Rewriting Rules for Multitenant Applications Based on Relational Algebra
指導教授: 陳恭
學位類別: 碩士
Master
系所名稱: 理學院 - 資訊科學系
論文出版年: 2013
畢業學年度: 102
語文別: 中文
論文頁數: 67
中文關鍵詞: 軟體即服務多租戶關聯式代數
外文關鍵詞: SaaS, Multi-tenant, Relational Algebra
相關次數: 點閱:156下載:7
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 隨著雲端運算的服務租用理念越來越受到重視,SaaS 服務供應商在提供服務的時候無不希望可以以最少的成本服務最多的客戶,於是吸引了許多的研究者投入精力以及時間,希望可以設計出讓租戶們共享資源又能夠有客製化空間的解決方案。服務供應商為了順利推廣多租戶軟體開發,其中一項關鍵技術是支援 SQL 語句自動轉換機制,目的是協助 SQL 語句轉換成以多租戶資料架構邏輯表達的 SQL 語句,讓租戶應用程式的軟體開發人員能夠專注在自身的應用程式開發。
    開發 SQL 語句自動轉換機制,必須先選定資料庫的資料架構,本論文採用 Universal Table Layout 這個 SaaS 多租戶資料共享常見的資料架構。 我們參考知名 SaaS 廠商 Force.com 的 Universal Table Layout 資料架構,並提出一些修正。其次,我們應用關聯式代數抽象化來設計 SQL 語句的轉換規則,這些理論結果不僅在表達轉換機制上更具有一般性,並且讓轉換規則的理解也變得更加容易。我們以這些理論推導為基礎實現一個實驗的工具,最後透過幾個實驗,觀察及探討實驗數據所呈現的意義。


    書名頁................................ i
    中文摘要 .............................. ii
    英文摘要 .............................. iii
    誌謝................................. v
    目錄................................. vi
    表目錄................................ x
    符號說明 .............................. xii
    常用符號縮寫一覽 ......................... xiii
    第一章、緒論 ............................ 1
    1.1 研究背景.......................... 1
    1.2 研究動機.......................... 3
    1.3 研究目的.......................... 3
    1.4 預期研究成果....................... 4
    第二章、相關研究與技術背景 ................... 5
    2.1 多租戶資料層級...................... 5
    2.2 表格綱要映射技術 .................... 7
    2.2.1 Universal Table Layout .............. 7
    2.2.2 Other Table Layout ................ 8
    2.3 Force.com Universal Table Layout . . . . . . . . . . . . 8
    2.3.1 Objects、Fields、Data表格........... 10
    2.3.2 Indexes、Uniquefields表格. . . . . . . . . . . . 11
    2.3.3 Relationships表格 ................ 12
    2.4 SQL語句改寫的設計與分析............... 13
    2.5 JSqlParser ......................... 13
    2.6 Apache Jmeter....................... 14
    2.6.1 Jmeter 的特性................... 14
    第三章、SQL語句改寫規則 .................... 16
    3.1 SQL語句改寫規則理念 ................. 16
    3.2 語句改寫規則的基本定義 ................ 21
    3.2.1 物件名稱轉換函數(Object Name Transformation) 21
    3.2.2 欄位名稱轉換函數(Field Name Transformation) 22
    3.3 INSERT INTO語句改寫規則 .............. 23
    3.3.1 Data表格 ..................... 24
    3.3.2 Uniquefields表格 ................. 25
    3.3.3 Indexes表格.................... 26
    3.3.4 Relationships表格 ................ 28
    3.3.5 一次插入多筆資料的 INSERT INTO 語句改寫 . 29
    3.4 DELETE語句改寫規則 ................. 30
    3.4.1 Data表格 ..................... 31
    3.4.2 Uniquefields表格 ................. 33
    3.4.3 Indexes表格.................... 36
    3.4.4 Relationships表格 ................ 37
    3.5 UPDATE語句改寫規則 ................. 39
    3.5.1 Data表格 ..................... 41
    3.5.2 Uniquefields表格 ................. 43
    3.5.3 Indexes表格.................... 46
    3.6 CREATE TABLE語句改寫規則............. 48
    3.6.1 Objects表格.................... 49
    3.6.2 Fields表格..................... 50
    3.6.3 Associations表格 ................. 52
    3.7 CREATE TABLE 語句 CONSTRAINTS 對語句的連帶影響............................ 53
    3.7.1 DELETE CASCADE policy ........... 54
    3.7.2 UPDATE CASCADE policy ........... 54
    3.7.3 DELETE SET null policy............. 55
    3.7.4 UPDATE SET null policy ............ 56
    3.7.5 DELETE SET Default policy. . . . . . . . . . . 56
    3.7.6 UPDATE SET Default policy . . . . . . . . . . 57
    第四章、實驗設計與分析...................... 58
    4.1 實驗工具實現....................... 58
    4.2 實驗設計.......................... 58
    4.2.1 實驗環境架設................... 59
    4.2.2 假想租戶資料表格 ................ 59
    4.2.3 實驗一-改變租戶資料庫大小.......... 60
    4.2.4 實驗二-改變同時操作的Clients人數 . . . . . 62
    4.3 總結............................ 63
    第五章、結論與未來研究方向 ................... 64
    5.1 結論............................ 64
    5.2 未來研究方向....................... 64
    參考文獻 .............................. 66

    [1] S. Aulbach, T. Grust, D. Jacobs, A. Kemper and J. Rittinger, “Multi-Tenant Databases for Software as a Service: Schema-Mapping Techniques,” in Proc. ACM International Conference on Management of Data, 2008
    [2] C. D. Weissman and S. Bobrowski, “The design of the Force.com multitenant internet application development platform,” in Proc. ACM SIGMOD International Conference on Management of Data, 2009.
    [3] The NIST Definition of Cloud Computing, ser. 800-145. NIST Special Publication, 2011
    [4] F. Chong, G. Carraro, (2006) Multi-tenant data architecture. [Online]. Available: http://msdn.microsoft.com/en-us/library/aa470986.aspx
    [5] F. Chong and G. Carraro. (2006) Architecture strategies for catching the long tail. [Online]. Available: http://msdn.microsoft.com/en-us/library/aa479069.aspx
    [6] C. F. Liao, J. J. Chen and K. Chen, “Toward a tenant-aware query rewriting engine for universal table shcema-mapping.” Proc. of the IEEE International Conference on Cloud Computing Technology and Science (IEEE CloudCom’12), 833-838, presented in 2012 International Workshop on SaaS (Software-as-a-Service) Architecture and Engineering., 2012
    [7] G. P. Copeland and S. N. Khoshafian, “A decomposition storage model.” Proc. ACM International Conference on Management of data (SIGMOD), pp. 268-279, 1985.
    [8] F. S. Foping, I. M. Dokas, J, Feehan, and S. Imaran, “A new hybrid scheme-sharing technique for multitenant applications.” Proc. 4th International Conference on Digital Information of Management, 2009.
    [9] J. Du, H. Y. Wen, and Z. J. Yang, “Research on data layer structure of multi-tenant e-commerce system.” Proc. 17th International Conference on Industrial Engineering and Engineering Management, 2010.
    [10] D. Maier and J. D. Ullman, “Maximal objects and the semantics of universal relation databases.” ACM Transaction on Database Systems, vol. 8, no. 11, pp. 1-14, 1983.
    [11] “The force.com multitenant architecture,” Force.com, Tech.Rep.
    [12] J. Pereira and T. C. Chiueh, “SQL rewriting engine and its applications.” Stony Brook University, Tech. Rep., 2007
    [13] C. F. Liao, K. Chen, and J. J. Chen, “Automatic query rewriting schemes for multi-tenant SaaS applications,” Unpublished Technical Report, 2013.
    [14] Apache JMeter http://jmeter.apache.org

    QR CODE
    :::