頁籤選單縮合
題名 | 跨資料表自動連結法之SQL語法產生器實作--以健保資料庫為例=Implementing a SQL Generator for Joining Multiple Tables without Direct Relationships Using Databases in Health Insurance as an Example |
---|---|
作者 | 蕭文峰; 陳源聰; 杜明賢; Hsiao, Wen-feng; Chen, Yuan-tsung; Tu, Ming-hsien; |
期刊 | 資訊管理展望 |
出版日期 | 20061200 |
卷期 | 8:2 民95.12 |
頁次 | 頁45-63 |
分類號 | 312.3 |
語文 | chi |
關鍵詞 | 連結查詢; 查詢圖; 廣度優先搜尋法; 連結條件; Join query; Query graph; Breath-first search; Join conditions; |
中文摘要 | 依據資料庫設計準則,理想的資料表應只包含單一實體,而詳細的資訊則可由使用額外的資料表及連結命令(join)來獲得。因此,跨資料表間資料查詢一直是結構化查詢語言(SQL)研究的重要議題。然而,連結查詢的成功與否與連結條件的設定有密切關係。目前實作上的限制是要求資料表間必須有直接的連結條件。在實務上,使用者卻很少注意所查詢的資料表間是否存在直接關聯(relation),如此常造成查詢失敗與挫折。如何讓使用者能很自然地完成此類查詢,是一大挑戰。本研究提出將資料表視為圖形上的端點,並利用廣度優先搜尋法(Breath-First Search, BFS)及修剪演算法來找出資料表間的中介資料表及連結條件,以完成跨資料表查詢。由系統執行結果顯示,本研究所提方法可有效解決資料表間無直接連結條件的查詢問題。 |
英文摘要 | According to the database design criteria, each table should contain only a single entity; further information should be obtained by using additional tables and by conducting the join operation. Therefore, multiple tables query has long been an important research issue for Structure Query Language (SQL). However, the success of a join query depends on the correctness of the join conditions. The current implementation is restricted by that the query should have direct joins. However, users seldom take notice of whether such relations do exist among their query tables. Therefore, they often commit to failure and thus are frustrated. How to allow users to conduct their query seamlessly is, therefore, a big challenge. This study proposes a graph-based approach to facilitate join operations. Each table is represented as a vertex, and each join condition as an edge. The breath-first search (BFS) and a follow-up pruning operation are, then, used to find the intermediate table(s) and join conditions, The empirical result shows that our method can effectively solve the query requirements, in which tables have no direct join conditions. |
本系統之摘要資訊系依該期刊論文摘要之資訊為主。