雲端運算的SaaS通常會提供給成千上萬的用戶共同使用,且彼此之間不會互相干擾。對於軟體廠商來說,每個用戶都共用一整套完整的軟硬體設施,不須擔負額外的成本以提供不同的實體給不同的用戶所使用。鑒於SaaS已是IT行業中的趨勢,在軟體市場具有相當大的潛力。多租戶技術使大量用戶共同使用相同的軟硬體資源,有效增加資源利用率,並可降低營運成本而提高收益。但將軟體移植到雲端時,必須克服軟體本身的限制和環境因素。本論文為了能夠快速將傳統軟體轉換為多租戶架構,解決多租戶資料隔離的問題,讓開發人員仍然可以使用傳統關聯式資料庫的寫法來開發應用程式,同時能夠支持跨多重租戶查詢,基於Chunk Table的資料結構,透過SQL語句轉換機制,將程式內的傳統關聯式SQL語句自動改寫成符合Chunk Table的SQL語句。我們以一個查詢範例成功地完成了Chunk Table即時性跨多重租戶的查詢實作,也額外以Materialized View做了非即時性跨多重租戶的查詢實作。 SaaS cloud computing provides thousands of users to operate without interfering with one another. From the software supplier’s point of view, each user sharing the same package of hardware and software, extra expense can be exempted from providing each user a different entity.With great potentials in software market, it is foreseen that the SaaS will become the trend of IT business. Multi-tenant technology increases resource utilization and reduces operational cost by using majority users’ software/hardware resources to create profits. However, transplanting software to the cloud requires overcoming the software limitation as well as the environment factors.To quickly convert from the traditional software to the multi-tenant structure and solve the data isolation issues, this research allows the developers to program using the traditional relational database and in the meantime support queries across multiple tenants. Based on the Chunk Table data structure and through the SQL statements conversion mechanism, the traditional relational SQL statements were automatically converted into the Chunk Table conformable SQL statements. We have also completed the tenant queries across multiple implementations. We have an example of a query successfully completed Chunk Table real-time queries across multiple tenants implemented. We also do extra to Materialized View non-real time queries across multiple tenants implemented.