TWI766757B - A system and a method for improving access performance of frequently used data and computer readable medium thereof - Google Patents
A system and a method for improving access performance of frequently used data and computer readable medium thereof Download PDFInfo
- Publication number
- TWI766757B TWI766757B TW110125879A TW110125879A TWI766757B TW I766757 B TWI766757 B TW I766757B TW 110125879 A TW110125879 A TW 110125879A TW 110125879 A TW110125879 A TW 110125879A TW I766757 B TWI766757 B TW I766757B
- Authority
- TW
- Taiwan
- Prior art keywords
- data
- module
- table data
- database
- conversion
- Prior art date
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本發明係有關於資料存取系統,尤其指一種提升常用資料存取效能之系統、方法及電腦可讀媒介。 The present invention relates to a data access system, and more particularly, to a system, a method and a computer-readable medium for improving the performance of common data access.
現今的大型資訊系統為滿足業務成長快速與穩定,常採用高階商用關聯式資料庫來進行關鍵熱點資料(即常用資料)的存取。然而,企業為了提升利潤,使得資料儲存的方式逐漸由成本較高的關聯式資料庫轉往NoSQL(Non-Structured Query Language)資料庫,藉由使用NoSQL資料庫,不僅能夠節降成本費用,更能大幅增加資料存取速度。 Today's large-scale information systems often use high-end commercial relational databases to access key hot data (that is, commonly used data) in order to meet the needs of rapid and stable business growth. However, in order to increase profits, enterprises have gradually shifted the way of data storage from high-cost relational databases to NoSQL (Non-Structured Query Language) databases. By using NoSQL databases, it can not only save costs, but also reduce costs. Can greatly increase the data access speed.
於習知技術中所採用的技術方案,係先判斷結構化查詢語言要求是否可轉換為非結構化查詢語言要求,若結構化查詢語言要求可轉換為非結構化查詢語言要求,則將結構化查詢語言要求轉換為非結構化查詢語言要求,並於非結構化查詢語言資料庫(即NoSQL資料庫)中執行非結構化查詢語言要求;若結構化查詢語言要求不可轉換為非結構化查詢語言 要求,則於結構化查詢語言資料庫(關聯式資料庫)中執行結構化查詢語言要求。 The technical solution adopted in the prior art is to first determine whether the structured query language requirements can be converted into unstructured query language requirements, and if the structured query language requirements can be converted into unstructured query language requirements, the The query language requirements are converted into unstructured query language requirements, and the unstructured query language requirements are executed in the unstructured query language database (ie NoSQL database); if the structured query language requirements cannot be converted into unstructured query language requirements request, the structured query language request is executed in the structured query language database (relational database).
但習知技術需要針對所有表格資料於關聯式資料庫與NoSQL資料庫進行即時同步,才可針對不同的查詢語言要求提供查詢資料的功能,且為了維持資料一致性,需要將相同的資料同時維護於兩個資料庫當中,造成營運成本與維護負擔很大的增加。 However, the conventional technology requires real-time synchronization of all table data between the relational database and the NoSQL database, so that the function of querying data can be provided for different query language requirements, and in order to maintain data consistency, the same data needs to be maintained at the same time. In the two databases, the operating cost and maintenance burden are greatly increased.
因此,如何克服習知技術於資料庫上所面臨的難題,已成為本領域技術人員目前的重要課題。 Therefore, how to overcome the difficulties faced by the conventional technology in the database has become an important issue for those skilled in the art.
為解決上述問題,本發明提供一種提升常用資料存取效能之系統,係包括:一表格資料分類模組,係取得複數表格資料以對該複數表格資料進行重要性分類,俾產生該複數表格資料所相對應的具有重要性類型之複數分類資料;一更新頻率設定模組,係提供依據不同的該複數表格資料之重要性設定更新頻率,以產生一更新頻率資料;一同步排程處理模組,係通訊連接該表格資料分類模組與該更新頻率設定模組,以接收來自該表格資料分類模組之具有重要性類型之複數分類資料與該更新頻率設定模組之更新頻率資料,再從該更新頻率資料匹配出對應於該複數分類資料之重要性類型的更新頻率,俾進行排程且依序發出執行該複數表格資料之轉換作業之指示;以及一表格資料轉換模組,係通訊連接該同步排程處理模組,以依序接收來該同步排程處理模組之轉換作業之指示,再根據該指 示將該複數表格資料進行轉換作業,俾將該經轉換的複數表格資料存入一資料庫。 In order to solve the above problem, the present invention provides a system for improving the access performance of common data, which includes: a table data classification module, which obtains plural table data to classify the importance of the plural table data, so as to generate the plural table data Corresponding plural classification data with importance types; an update frequency setting module for setting the update frequency according to the different importance of the plural table data, so as to generate an update frequency data; a synchronous scheduling processing module , which is to communicate and connect the table data classification module and the update frequency setting module to receive the complex classification data with important types from the table data classification module and the update frequency data of the update frequency setting module, and then from the table data classification module. The update frequency data matches the update frequency corresponding to the importance type of the plurality of classification data, so as to schedule and sequentially issue an instruction to perform the conversion operation of the plurality of table data; and a table data conversion module, which is a communication connection The synchronous scheduling processing module receives instructions of the conversion operation of the synchronous scheduling processing module in sequence, and then according to the instruction means to perform a conversion operation on the plural form data so as to store the converted plural form data in a database.
本發明更提供一種提升常用資料存取效能之方法,係包括:由一表格資料分類模組取得複數表格資料,以對該複數表格資料進行重要性分類,俾產生該複數表格資料所相對應的具有重要性類型之複數分類資料;由一更新頻率設定模組提供依據不同的該複數表格資料之重要性設定更新頻率,以產生一更新頻率資料;由一同步排程處理模組接收來自該表格資料分類模組之具有重要性類型之複數分類資料與該更新頻率設定模組之更新頻率資料,以從該更新頻率資料匹配出對應於該複數分類資料之重要性類型的更新頻率,俾進行排程且依序發出執行該複數表格資料之轉換作業之指示;以及由一表格資料轉換模組依序接收來該同步排程處理模組之轉換作業之指示,再根據該指示將該複數表格資料進行轉換作業,俾將該經轉換的複數表格資料存入一資料庫。 The present invention further provides a method for improving the access performance of common data, which includes: obtaining plural table data from a table data classification module, so as to classify the importance of the plural table data, so as to generate the corresponding data of the plural table data. Plural classification data with importance types; provided by an update frequency setting module to set the update frequency according to the different importance of the plurality of table data to generate an update frequency data; received from the table by a synchronous scheduling processing module The complex classification data with the importance type of the data classification module and the update frequency data of the update frequency setting module are used to match the update frequency corresponding to the importance type of the complex classification data from the update frequency data, so as to perform sorting. the program and sequentially issue instructions to perform the conversion operation of the plurality of table data; and a table data conversion module sequentially receives the instructions of the conversion operation of the synchronous scheduling processing module, and then according to the instruction, the plurality of table data A conversion operation is performed to store the converted plural form data in a database.
於一實施例中,該複數表格資料係儲存於關聯式資料庫,而該經轉換的複數表格資料係儲存於NoSQL(Non-Structured Query Language)資料庫。 In one embodiment, the plural table data is stored in a relational database, and the converted plural table data is stored in a NoSQL (Non-Structured Query Language) database.
於一實施例中,更包括一更新紀錄資料庫,係儲存有每次執行該複數表格資料之轉換作業所產生的更新紀錄,其中,當該表格資料轉換模組接收到該同步排程處理模組所發出的該轉換作業之指示後,該表格資料轉換模組從該更新紀錄資料庫取得該複數表格資料在前次轉換的更新紀錄,以依據該更新紀錄中所紀錄的該複數表格資料之內容的更新範圍取得該複數表格資料之內容,俾進行轉換作業。 In one embodiment, it further includes an update record database, which stores the update records generated each time the conversion operation of the plurality of table data is performed, wherein, when the table data conversion module receives the synchronization schedule processing module After the instruction of the conversion operation issued by the team, the form data conversion module obtains the update record of the previous conversion of the plural form data from the update record database, so as to use the plural form data recorded in the update record. The content update range acquires the content of the plural table data for conversion operation.
於一實施例中,該表格資料轉換模組更通訊連接該表格資料分類模組,以取得該複數分類資料,再依據該複數分類資料中之資料格式轉換相對應的該複數表格資料,產生該經轉換的複數表格資料。 In one embodiment, the form data conversion module is further connected to the form data classification module in communication to obtain the plural classified data, and then converts the corresponding plural form data according to the data format in the plural classified data to generate the plural form data. Converted plural form data.
於一實施例中,更包括一資料鍵值產製模組,係通訊連接該表格資料轉換模組,以依據該經轉換的複數表格資料建立用以提供在該資料庫中查詢該經轉換的複數表格資料所使用的資料鍵值,且將該資料鍵值寫入該資料庫中儲存。 In one embodiment, it further includes a data key-value production module, which is communicatively connected to the table data conversion module, and is established according to the converted plural table data for querying the converted data in the database. The data key value used by the plurality of table data, and the data key value is written into the database for storage.
於一實施例中,更包括一SQL(Structured Query Language)語法導入模組,係接收用以查詢該複數表格資料之一者之內容的一SQL語法。 In one embodiment, an SQL (Structured Query Language) syntax import module is further included, which receives an SQL syntax for querying the content of one of the plurality of table data.
於一實施例中,更包括一語法解析轉換模組,係通訊連接該SQL語法導入模組,以接收該SQL語法,並於解析該SQL語法後產生一解析資料。 In one embodiment, it further includes a syntax parsing conversion module, which is communicatively connected to the SQL syntax importing module to receive the SQL syntax and generate parsing data after parsing the SQL syntax.
於一實施例中,更包括一查詢鍵值產製模組,係通訊連接語法解析轉換模組,以接收該解析資料,再依據該解析資料針對該資料庫產製符合查詢條件之查詢鍵值,俾提供於該資料庫中查詢該經轉換的複數表格資料之一者。 In one embodiment, it further includes a query key-value generating module, which is connected to the syntax parsing conversion module in communication to receive the parsing data, and then generate query keys that meet the query conditions for the database according to the parsing data. , which is provided for querying one of the converted plural form data in the database.
於一實施例中,該查詢鍵值產製模組利用該查詢鍵值從該資料庫中查詢出相對應的資料鍵值,以透過該資料鍵值從該資料庫取出相對應的該經轉換的複數表格資料之一者。 In one embodiment, the query key generation module uses the query key to query the corresponding data key from the database, so as to retrieve the corresponding converted data from the database through the data key One of the plural form data of .
本發明又提供一種電腦可讀媒介,應用於計算裝置或電腦中,係儲存有指令,以執行上述之提升常用資料存取效能之方法。 The present invention further provides a computer-readable medium, which is applied to a computing device or a computer and stores instructions for executing the above-mentioned method for improving the access performance of common data.
由上可知,本發明係提供一種提升常用資料存取效能之系統、方法及其電腦可讀媒介,提出透過資料移轉增量更新技術,針對關聯式資料庫內容進行表格資料之重要性分類,藉此設定表格資料更新頻率,且主動定時排程,將關聯式資料庫中的表格資料依序轉換至NoSQL資料庫中。此外,針對關聯式資料庫的SQL語法,本發明亦提出SQL語法解析轉換技術,使得原本採用關聯式資料庫的應用程式不需更動原始的SQL語法,即能於NoSQL資料庫中存取內容,降低程式平台移轉需要的時間與提升系統整體彈性。 As can be seen from the above, the present invention provides a system, method and computer-readable medium for improving the access performance of common data, and proposes to classify the importance of table data according to the content of the relational database through the incremental update technology of data transfer, In this way, the update frequency of the table data is set, and the table data in the relational database is sequentially converted to the NoSQL database according to the active schedule. In addition, for the SQL grammar of the relational database, the present invention also proposes a SQL grammar parsing and conversion technology, so that the application program originally using the relational database can access the content in the NoSQL database without changing the original SQL grammar. Reduce the time required for program platform transfer and improve the overall flexibility of the system.
1:提升常用資料存取效能之系統 1: A system to improve the performance of common data access
11:表格資料分類模組 11: Form data classification module
12:更新頻率設定模組 12: Update frequency setting module
13:同步排程處理模組 13: Synchronous scheduling processing module
14:表格資料轉換模組 14: Form data conversion module
15:資料鍵值產製模組 15: Data key value production module
16:SQL語法導入模組 16: SQL syntax import module
17:語法解析轉換模組 17: Syntax parsing conversion module
18:查詢鍵值產製模組 18: Query key-value production module
21:關聯式資料庫 21: Associative Repository
22:NoSQL資料庫 22: NoSQL Repository
23:更新紀錄資料庫 23: Update record database
S21至S211:步驟 S21 to S211: Steps
圖1係為本發明之提升常用資料存取效能之系統架構示意圖;以及 FIG. 1 is a schematic diagram of a system architecture for improving common data access performance according to the present invention; and
圖2係為本發明之提升常用資料存取效能的方法流程示意圖。 FIG. 2 is a schematic flowchart of a method for improving the access performance of common data according to the present invention.
以下藉由特定的具體實施例說明本發明之實施方式,熟悉此技藝之人士可由本說明書所揭示之內容輕易地瞭解本發明之其他優點及功效。 The following specific embodiments are used to illustrate the implementation of the present invention, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification.
須知,本說明書所附圖式所繪示之結構、比例、大小等,均僅用以配合說明書所揭示之內容,以供熟悉此技藝之人士之瞭解與閱讀,並非用以限定本發明可實施之限定條件,故不具技術上之實質意義,任何結構之修飾、比例關係之改變或大小之調整,在不影響本發明所能產生之 功效及所能達成之目的下,均應仍落在本發明所揭示之技術內容得能涵蓋之範圍內。同時,本說明書中所引用之如「一」、「第一」、「第二」、「上」及「下」等之用語,亦僅為便於敘述之明瞭,而非用以限定本發明可實施之範圍,其相對關係之改變或調整,在無實質變更技術內容下,當視為本發明可實施之範疇。 It should be noted that the structures, proportions, sizes, etc. shown in the drawings in this specification are only used to cooperate with the contents disclosed in the specification for the understanding and reading of those who are familiar with the art, and are not intended to limit the implementation of the present invention. Therefore, it has no technical significance, and any modification of the structure, change of the proportional relationship or adjustment of the size will not affect the performance of the present invention. The effect and the achievable purpose should still fall within the scope that the technical content disclosed in the present invention can cover. At the same time, terms such as "a", "first", "second", "upper" and "lower" quoted in this specification are only for the convenience of description and are not used to limit the scope of the present invention. The scope of implementation and the change or adjustment of its relative relationship shall be regarded as the scope of implementation of the present invention without substantially changing the technical content.
圖1係為本發明之提升常用資料存取效能之系統架構示意圖。如圖1所示,該提升常用資料存取效能之系統1係包括:一表格資料分類模組11、一更新頻率設定模組12、一同步排程處理模組13、一表格資料轉換模組14、一資料鍵值產製模組15、一SQL(Structured Query Language)語法導入模組16、一語法解析轉換模組17、一查詢鍵值產製模組18、一關聯式資料庫21、一NoSQL(Non-Structured Query Language)資料庫22以及一更新紀錄資料庫23。
FIG. 1 is a schematic diagram of a system architecture for improving the access performance of common data according to the present invention. As shown in FIG. 1 , the
具體而言,該提升常用資料存取效能的1係建立於一伺服器(如通用型伺服器、檔案型伺服器、儲存單元型伺服器等)或其它適當演算機制之電子設備,且該些模組與資料庫均可為軟體、硬體或韌體;若為硬體,則可為具有資料處理與運算能力之處理單元、處理器、電腦或伺服器;若為軟體或韌體,則可包括處理單元、處理器、電腦或伺服器可執行之指令,且可安裝於同一硬體裝置或分布於不同的複數硬體裝置。 Specifically, the improvement of common data access performance is established on a server (such as a general-purpose server, a file-based server, a storage unit-based server, etc.) or other electronic devices with appropriate computing mechanisms, and these Modules and databases can be software, hardware or firmware; in the case of hardware, they can be processing units, processors, computers or servers with data processing and computing capabilities; in the case of software or firmware, they can be It may include instructions executable by a processing unit, processor, computer or server, and may be installed on the same hardware device or distributed across multiple hardware devices.
表格資料分類模組11係通訊連接關聯式資料庫21,且取得關聯式資料庫21中的複數表格資料,以對該些表格資料的不同種類進行重要性分類,俾產生相對應的具有重要性類型之複數分類資料,其中,重要性類型代表該些表格資料之重要性的高低。
The table
在一實施例中,表格資料係包含其所儲存在的關聯式資料庫21之名稱、資料表之名稱與詳細資料內容,而該些表格資料之種類係包括權限資料、業務資料、代碼表與相關紀錄檔等,但不限於上述,其重要性由高至低分為權限資料、業務資料、代碼表及相關紀錄檔,且該些表格資料依據不同程度的重要性其相對應的異動轉換更新頻率也不同。在另一實施例中,該些表格資料係可儲存在同一關聯式資料庫21中,也可儲存在同一關聯式資料庫21中的不同的子資料庫中,或是分散式的儲存於不同的關聯式資料庫21中,亦不限於上述。
In one embodiment, the table data includes the name of the
在一實施例中,分類資料係包含表格資料所儲存在的關聯式資料庫21之名稱、資料表之名稱、重要性類型、以及將表格資料從關聯式資料庫21轉換至NoSQL資料庫22所採用的資料格式。
In one embodiment, the categorization data includes the name of the
更新頻率設定模組12係提供一使用者或應用程式依據不同的該些表格資料之重要性,設定該些表格資料的更新頻率,進而產生一更新頻率資料。在一實施例中,該些分類資料之重要性類型為高重要性者,其相對應的表格資料以秒鐘或分鐘作為更新頻率單位,而該些分類資料之重要性類型為中重要性者,其相對應的表格資料以分鐘或小時作為更新頻率單位,以及該些分類資料之重要性類型為低重要性者,其相對應的表格資料以小時或天數作為更新頻率單位。
The update
舉例而言,更新頻率設定模組12依據該些表格資料之各種類的特性與需求,對於該些表格資料更新頻率的時效性也不相同,其中,該些表格資料中之高或中重要性者其需要較高的更新頻率,以能夠即時反應該些表格資料中異動項目的變化,避免處理過時的資料內容,而該些表格
資料中之低重要性者其需要較低的更新頻率,以能夠有效利用系統資源,避免造成效能互相影響的情況發生。
For example, the update
在一實施例中,更新頻率設定模組12更針對固定不常變動的表格資料採用需求更新的方式,待有需要使用新表格資料之內容的時候再進行資料更新,亦能夠有效利用系統資源。
In one embodiment, the update
同步排程處理模組13係通訊連接表格資料分類模組11與更新頻率設定模組12,接收來自表格資料分類模組11之具有重要性類型之複數分類資料與來自更新頻率設定模組12之更新頻率資料,以從更新頻率資料匹配出對應於該些分類資料之重要性類型的更新頻率,俾進行排程,且依序發出執行該些表格資料之轉換作業之指示。
The synchronous
在一實施例中,同步排程處理模組13依據重要性類型與更新頻率資料將關聯式資料庫21中的複數表格資料按照更新頻率由高至低分為第一排程、第二排程、第三排程及第四排程,其中:
In one embodiment, the synchronization
1.第一排程係為該些表格資料中異動頻率大者,例如,權限資料,其重要性屬於高等,會經常性的變動資料內容,且使用讀取的機會也比較大,故更新頻率過慢會導致權限資料的一致性問題發生,因而採用秒鐘為單位設定排程進行異動更新,能避免資料處理上發生內容不一致或是資料過舊的情況發生。 1. The first schedule is the one with the highest frequency of changes in the table data. For example, the authority data is of high importance. The content of the data will be changed frequently, and the chances of using and reading are relatively large, so the update frequency is If it is too slow, it will cause the consistency of authority data to occur. Therefore, the schedule is set in seconds for transaction update, which can avoid the occurrence of content inconsistency in data processing or the occurrence of data that is too old.
2.第二排程係為該些表格資料中異動頻率中間者,例如,業務資料,其重要性屬於中等,較不會經常性讀取的資料,都可以歸類為異動頻率中的類別,此類別可以設定採用分鐘為單位設定排程進行異動更新。 2. The second schedule is the middle of the frequency of change in these table data, for example, business data, its importance is medium, and the data that is not read frequently can be classified as the category of frequency of change, This category can be set to use minutes as a unit to set the schedule for transaction update.
3.第三排程係為該些表格資料中異動頻率小者,例如,代碼表,其重要性屬於低等,且時效性需求屬於最低的階層,會異動的次數非 常少,而不常進行異動,因此在資料同步排程處理上可以設定為最低頻率,頻率可以設定以小時或天為單位設定排程進行異動更新。 3. The third schedule is the one with the smallest change frequency in the table data, for example, the code table, its importance is low, and the timeliness requirements belong to the lowest level, and the number of changes will be different. It is often rare, and changes are not often performed, so the data synchronization schedule processing can be set to the lowest frequency, and the frequency can be set in hours or days to set the schedule for transaction update.
4.第四排程係為該些表格資料中不異動者,例如,相關紀錄檔,其作為紀錄的資料表,僅單純提供異動項目的操作流程軌跡紀錄,用以查詢相關操作紀錄或是障礙排除使用,因此相關紀錄檔幾乎不需要更新,同步處理上可以設定為不需處理。 4. The fourth schedule is for those that do not change the data in these tables, for example, the relevant record file, which is used as the data table of the record, and only provides the operation process track record of the changed item, which is used to query the relevant operation records or obstacles. Excluded from use, so the related record files hardly need to be updated, and the synchronization process can be set to not need to be processed.
表格資料轉換模組14係通訊連接表格資料分類模組11、同步排程處理模組13、關聯式資料庫21、NoSQL資料庫22及更新紀錄資料庫23,其中,當表格資料轉換模組14接收到同步排程處理模組13所發出的執行該些表格資料之轉換作業之指示後,先從更新紀錄資料庫23取得該些表格資料在前次轉換的更新紀錄,以依據更新紀錄從關聯式資料庫21取得此次需要進行轉換作業之該些表格資料。
The table
再者,表格資料轉換模組14依據來自表格資料分類模組11的該些分類資料中之資料格式執行該些表格資料從關聯式資料庫21轉換至NoSQL資料庫22的轉換作業,俾產生該些經轉換的表格資料,並存入NoSQL資料庫22。
Furthermore, the table
在一實施例中,更新紀錄資料庫23係儲存每次執行表格資料之轉換作業所產生的更新紀錄(包括資料庫之名稱、資料表之名稱、更新範圍與更新時間等,但不限於上述),用以提供下次執行轉換作業的參考使用,例如,表格資料轉換模組14依據更新紀錄中之資料庫與資料表之名稱確認此次轉換作業需要轉換的複數表格資料,以及依據更新紀錄中之更新範圍確定此次轉換作業需要轉換的複數表格資料之範圍,且於完成轉換
作業後,更新紀錄資料庫23將此次轉換過後的該些表格資料之更新紀錄回寫至更新紀錄資料庫23當中,以供後續參考。
In one embodiment, the
在一實施例中,若該些表格資料為首次執行轉換作業,則表格資料轉換模組14提供使用者設定該些表格資料所需要轉換的範圍,亦即,設定該些表格資料中哪些表格資料需要進行轉換。
In one embodiment, if the table data is converted for the first time, the table
在一實施例中,表格資料轉換模組14更提供使用者設定表格資料之轉換作業所進行的執行方式,進而依據表格資料設定其關鍵字,以及設定表格資料之轉換範圍,其中,進行的表格資料之轉換作業分為下列幾種執行方式:
In one embodiment, the table
1.One Key-One Data(一關鍵字相對應一表格資料): 1.One Key-One Data (one keyword corresponds to one form data):
當使用者設定該些表格資料之內容為唯一關鍵字(One Key)的型態存放在關聯式資料庫21時,其唯一關鍵字可以相對應出唯一的一筆表格資料,以依據該些表格資料之唯一關鍵字將該些表格資料轉換至NoSQL資料庫22中,且表格資料轉換模組14將該些表格資料依據相對應的分類資料中之資料格式(如Map型態)進行轉換,並存入NoSQL資料庫22。是以,當使用者於NoSQL資料庫22中進行查詢表格資料時,透過唯一關鍵字即可將相對應的表格資料以Map型態整個取回,再針對需要的表格資料中的欄位資料加以處理。
When the user sets the content of the table data to be stored in the
2.Multiple Key-One Data(多個關鍵字相對應一表格資料): 2.Multiple Key-One Data (multiple keywords correspond to one table data):
當使用者設定該些表格資料之內容為多個關鍵字(Multiple Key)的型態存放在關聯式資料庫21時,其多個關鍵字之組合可以對應出
唯一的一筆表格資料,以依據該些表格資料之多個關鍵字將該些表格資料轉換至NoSQL資料庫22中,且表格資料轉換模組14將該些表格資料依據相對應的分類資料中之資料格式(如Map型態)進行轉換,又,多個關鍵字之間以任意特殊符號(如&、*、%等,但不限於上述)作為區隔。是以,當使用者於NoSQL資料庫22中進行查詢表格資料時,透過唯一的多個關鍵字之組合即可將相對應的表格資料以Map型態整個取回,再針對需要的表格資料中的欄位資料加以處理。
When the user sets the content of the table data to be stored in the
3.One Key-Multiple Data(一關鍵字相對應多個表格資料): 3.One Key-Multiple Data (one keyword corresponds to multiple table data):
當使用者設定該些表格資料之內容為唯一關鍵字(One Key)的型態存放在關聯式資料庫21時,其唯一關鍵字可以對應出多筆表格資料,以依該些表格資料之唯一關鍵字將該些表格資料轉換至NoSQL資料庫22中,且表格資料轉換模組14將該些表格資料依據相對應的分類資料中之資料格式(如Set型態)進行轉換。是以,當使用者於NoSQL資料庫22中進行查詢多筆表格資料時,透過唯一關鍵字即可將相對應的多個表格資料以Set型態的方式整個取回,且取回的該些表格資料內容不會重複。
When the user sets the content of the table data as a type of unique key (One Key) stored in the
資料鍵值產製模組15係通訊連接表格資料轉換模組14,依據該些經轉換的表格資料於表格資料轉換模組14中所設定的關鍵字(如唯一關鍵字(One Key)、多個關鍵字(Multiple Key))以及表格資料之轉換範圍(如轉換完整的表格資料,或是轉換部分的表格資料),建立用以提供在NoSQL資料庫22中查詢該些經轉換的表格資料所使用的資料鍵值,且將
資料鍵值寫入NoSQL資料庫22中儲存,其中,資料鍵值設計方式依照使用需求有以下設計方式:
The data key
1.第一產製方式:當表格資料之轉換範圍係為轉換完整的表格資料時,採用該些表格資料之完整名稱,並依照階層大小依序排列,分別為資料庫之名稱、資料表之名稱、查詢鍵值與查詢值域,各階層中間使用冒號「:」作為分隔符號以設計資料鍵值,其中,查詢鍵值與查詢值域係為設定的關鍵字(如唯一關鍵字(One Key)、多個關鍵字(Multiple Key))。 1. The first production method: when the conversion scope of table data is to convert complete table data, the full names of the table data are used, and they are arranged in order according to the size of the hierarchy, namely the name of the database, the name of the data table. Name, query key value and query value field, use a colon ":" as a separator in the middle of each layer to design data key value, among which, the query key value and query value field are the set keywords (such as the unique keyword (One Key ), Multiple Keys).
在一實施例中,當查詢鍵值及查詢值域所設定的關鍵字為多個關鍵字(Multiple Key)時,以使用「&」作為串接符號而結合該些表格資料中至少二者的完整名稱及其內容,俾產製查詢鍵值及查詢值域(於後續實施例中說明)。應可理解地,此設計方式可以完整對應在關聯式資料庫21中原始的表格資料,以透過查詢鍵值及查詢值域取得完整的經轉換的表格資料。
In one embodiment, when the query key value and the keyword set in the query value field are multiple keys, "&" is used as a concatenation symbol to combine at least two of the table data. The complete name and its content are used to generate query keys and query value fields (described in the following embodiments). It should be understood that this design method can completely correspond to the original table data in the
2.第二產製方式:當表格資料之轉換範圍係為轉換部分的表格資料時,採用條件式資料欄位,並依照階層大小依序排列,分別為資料庫名稱、查詢欄位、查詢鍵值與查詢值域,各階層中間使用冒號作為分隔符號,而查詢欄位使用「@」(或其他特殊符號)作為串接符號以設計資料鍵值(於後續實施例中說明)。因NoSQL資料庫22為一個資料鍵值的資料處理方式,無法依照不同SQL語法進行條件篩選,此設計方式能夠將所需要使用的表格資料先行進行過濾篩選,亦即,設定表格資料之轉換範圍,並儲存至NoSQL資料庫22中,便於後續處理使用。
2. The second production method: when the conversion range of the table data is the table data of the conversion part, the conditional data fields are used, and they are arranged in order according to the size of the hierarchy, namely database name, query field, and query key. In the value and query value fields, colons are used as separators in the middle of each level, and "@" (or other special symbols) are used as concatenation symbols in the query field to design data key values (described in the following embodiments). Since the
SQL語法導入模組16係接收一使用者或其他系統之應用程式輸入用以查詢表格資料之SQL語法。
The SQL
語法解析轉換模組17係通訊連接SQL語法導入模組16,以接收由SQL語法導入模組16傳送的用以查詢表格資料之SQL語法,再針對用以查詢表格資料之SQL語法進行關鍵字解析,俾依序取得資料庫之名稱、資料表之名稱、查詢欄位、查詢鍵值與查詢值域等相關之解析資料,但不限於上述。
The syntax
查詢鍵值產製模組18係通訊連接語法解析轉換模組17,以接收由語法解析轉換模組17傳送的解析資料(如資料庫之名稱、資料表之名稱、查詢欄位、查詢鍵值與查詢值域),再依據解析資料並針對NoSQL資料庫22產製符合查詢條件之查詢鍵值,以提供於NoSQL資料庫22中查詢一經轉換的表格資料。
The query key
在一實施例中,查詢鍵值產製模組18利用其產製的查詢鍵值從NoSQL資料庫22查詢出相對應的資料鍵值,以透過資料鍵值從NoSQL資料庫22取出相對應的該些經轉換的表格資料,俾得到查詢結果。
In one embodiment, the query
下列實施例係為本發明之提升常用資料存取效能之系統執行轉換作業的第一實施例,且此執行轉換作業的實施例之主要內容如下,其餘內容相同於上述圖1說明,於此不再重覆敘述。 The following embodiment is the first embodiment of the system for improving the access performance of common data of the present invention to perform the conversion operation. Repeat the narration.
於本實施例中,關聯式資料庫21儲存有一員工資料表(如表格資料),且員工資料表之內容以員工編號(即empno)作為唯一關鍵字(One Key)的型態存放在關聯式資料庫21,如表1所示,例如,員工資料表包含資料庫之名稱:security、資料表之名稱:employee、員工編號(即empno)、員
工名稱(即empname)、辦公室(即office)、性別(即gender)以及連絡電話(即mobile)等,但不限於上述。
In this embodiment, the
表1:員工資料表
表格資料分類模組11向關聯式資料庫21取得員工資料表,且對員工資料表進行重要性分類,以產生相對應的具有重要性類型之分類資料,如下表2所示,其中,員工資料表中的重要性類型之等級為B,且員工資料表所要轉換成的資料格式為MAP。
The table
表2:員工資料表之分類資料
更新頻率設定模組12提供一使用者依據不同的重要性類型設定該些表格資料的更新頻率,以產生一更新頻率資料,如表3所示。詳言之,重要性類型之等級越高,其更新頻率也越高,其中,重要性類型之等級由高至低分為A、B、C、D等。
The update
表3:更新頻率資料
同步排程處理模組13將員工資料表之分類資料中的重要性類型(B)與更新頻率資料進行匹配,以得到相對應的更新頻率(10分鐘),且依據更新頻率(10分鐘)進行排程,其中,員工資料表之更新頻率(10分鐘)為異動頻率中間者,故同步排程處理模組13將員工資料表設定為第二排程,以向表格資料轉換模組14發出執行員工資料表之轉換作業之指示。
The synchronous
表格資料轉換模組14接收到轉換作業之指示後,從更新紀錄資料庫23取得員工資料表在前次轉換的更新紀錄,如表4所示,以依據更新紀錄中的更新範圍(A001)從關聯式資料庫21取得此次需要進行轉換作業之員工資料表中的員工甲之員工資料。
After receiving the instruction of the conversion operation, the table
表4:更新紀錄
具體而言,表格資料轉換模組14採用一員工編號對應一員工資料之執行方式,以透過員工編號(A001)作為更新依據,且確認更新紀錄中的更新範圍(A001)取得此次需要進行轉換作業之員工資料表中的員工甲之員工資料。
Specifically, the form
再者,表格資料轉換模組14更提供使用者設定表格資料之轉換作業所執行的方式(如One Key-One Data之執行方式),進而依據表格資料設定其關鍵字,例如:表格資料轉換模組14提供使用者將員工資料表(如表1所示)中之員工編號(即empno)及其內容(即A001)設定為唯一關鍵字(One Key),以及設定表格資料之轉換範圍(如完整的表格資料)。
Furthermore, the table
接著,表格資料轉換模組14依據設定表格資料之轉換範圍(如完整的表格資料)以及相對應的分類資料中之資料格式(Map型態)將員工資料表中的員工甲之員工資料進行轉換,以產生經轉換的員工甲之員工資料,如表5所示,再存入NoSQL資料庫22中。
Next, the form
表5:經轉換的員工甲之員工資料
資料鍵值產製模組15依據表格資料轉換模組14所設定的員工編號(即empno)及其內容(即A001)為唯一關鍵字(One Key),以及表格資料之轉換範圍(如完整的表格資料),以採用「第一產製方式」設計一資料鍵值,俾利用經轉換的員工甲之員工資料建立資料鍵值,其中,關於員工甲之資料鍵值依序包含資料庫之名稱(security)、資料表之名稱(employee)、查詢鍵值(empno)與查詢值域(A001),且各階層中間使用冒號「:」作為分隔符號以形成資料鍵值,例如,員工甲之資料鍵值係為security:employee:empno:A001,最後將員工甲之資料鍵值寫入NoSQL資料庫22中儲存。應可理解地,因員工編號(即empno)及其內容(A001)被設定為唯一關鍵字(One Key),故查詢鍵值係為empno,而查詢值域係為A001。
The data key
是以,NoSQL資料庫22儲存有經轉換的員工甲之員工資料(Value)及其資料鍵值(Key),如表6所示,藉此完成更新作業。
Therefore, the
表6:第一實施例之NoSQL資料庫儲存之內容
下列實施例係為本發明之提升常用資料存取效能之系統執行轉換作業的第二實施例,且此執行轉換作業的實施例之主要內容如下,其餘內容相同於第一實施例,且一併參閱圖1說明之,於此不再重覆敘述。 The following embodiment is the second embodiment of the system for improving the access performance of common data of the present invention to perform the conversion operation, and the main contents of this embodiment for performing the conversion operation are as follows, and the other contents are the same as the first embodiment, and together Referring to FIG. 1 for description, the description will not be repeated here.
於本實施例中,表格資料轉換模組14更提供使用者設定表格資料之轉換作業所執行的方式(如Multiple Key-One Data之執行方式),進而依據表格資料設定其關鍵字,例如:表格資料轉換模組14提供使用者將員工資料表(如表1所示)中之員工名稱(即empname)及其內容(即員工甲)以及辦公室(即office)及其內容(即O008)設定為多個關鍵字(Multiple Key),以及設定表格資料之轉換範圍(如完整的表格資料)。
In this embodiment, the table
接著,表格資料轉換模組14依據設定表格資料之轉換範圍(如完整的表格資料)以及相對應的分類資料中之資料格式(Map型態)將員工資料表中的員工甲之員工資料進行轉換,以產生經轉換的員工甲之員工資料(如表5所示),再存入NoSQL資料庫22中。
Next, the form
資料鍵值產製模組15依據表格資料轉換模組14所設定的員工名稱(即empname)及其內容(即員工甲)以及辦公室(即office)及其內容(即O008)為多個關鍵字(Multiple Key),以及表格資料之轉換範圍(如完整的表格資料),以採用「第一產製方式」設計一資料鍵值,俾利用經
轉換的員工甲之員工資料建立資料鍵值,其中,關於員工甲之資料鍵值依序包含資料庫之名稱(security)、資料表之名稱(employee)、查詢鍵值(empname&office)與查詢值域(員工甲&O008),且各階層中間使用冒號「:」作為分隔符號以形成資料鍵值,例如,員工甲之資料鍵值係為security:employee:empname&office:員工甲&O008,最後將員工甲之資料鍵值寫入NoSQL資料庫22中儲存。
The data key
在一實施例中,因員工名稱(即empname)及辦公室(即office)被設定為多個關鍵字(Multiple Key),所以於查詢鍵值及查詢值域中分別以「&」作為串接符號故查詢鍵值係為empname&office,而查詢值域係為員工甲&O008。 In one embodiment, since the employee name (ie empname) and the office (ie office) are set as multiple keys, "&" is used as a concatenation symbol in the query key value and the query value field respectively Therefore, the query key value is empname&office, and the query value field is employee A&O008.
是以,NoSQL資料庫22儲存有經轉換的員工甲之員工資料(Value)及其資料鍵值(Key),如表7所示,藉此完成更新作業。
Therefore, the
表7:第二實施例之NoSQL資料庫儲存之內容
下列實施例係為本發明之提升常用資料存取效能之系統執行轉換作業的第三實施例,且此執行轉換作業的實施例之主要內容如下,其餘內容相同於第一實施例,且一併參閱圖1說明之,於此不再重覆敘述。 The following embodiment is the third embodiment of the system for improving the access performance of common data of the present invention to perform the conversion operation, and the main content of this embodiment for performing the conversion operation is as follows, and the rest of the content is the same as the first embodiment, and together Referring to FIG. 1 for description, the description will not be repeated here.
於本實施例中,表格資料轉換模組14更提供使用者設定表格資料之轉換作業所執行的方式(如One Key-One Data之執行方式),進而依據表格資料設定其關鍵字,例如:表格資料轉換模組14提供使用者將員工資料表(如表1所示)中之員工編號(即empno)及其內容(即A001)設定為唯一關鍵字(One Key),以及設定表格資料之轉換範圍(如部分的表格資料)
In this embodiment, the table
接著,表格資料轉換模組14依據設定表格資料之轉換範圍(如部分的表格資料)以及相對應的分類資料中之資料格式(Map型態)將員工資料表中的員工甲之員工資料進行轉換,例如:表格資料之轉換範圍係為性別(即gender)以及連絡電話(即mobile),以產生經轉換的員工甲之員工資料,如表8所示,再存入NoSQL資料庫22中。
Next, the form
表8:經轉換的員工甲之員工資料
資料鍵值產製模組15依據表格資料轉換模組14所設定的員工編號(即empno)及其內容(即A001)為唯一關鍵字(One Key),以及表格資料之轉換範圍(如部分的表格資料),以採用「第二產製方式」設計一資料鍵值,俾利用經轉換的員工甲之員工資料建立資料鍵值,其中,關於員工甲之資料鍵值依序包含資料庫之名稱(security)、查詢欄位(gender@mobile)、查詢鍵值(empno)與查詢值域(A001),且各階層中間使用冒號「:」作為分隔符號以形成資料鍵值,例如,員工甲之資
料鍵值係為security:gender@mobile:empno:A001,最後將員工甲之資料鍵值寫入NoSQL資料庫22中儲存。
The data key
在一實施例中,性別(即gender)及連絡電話(即mobile)係作為表格資料之轉換範圍,亦即作為於查詢欄位中的值,而性別(即gender)及連絡電話(即mobile)之間以「@」作為串接符號,是以查詢欄位中的值係為gender@mobile。 In one embodiment, gender (ie gender) and contact phone number (ie mobile) are used as the conversion range of table data, that is, as values in the query field, while gender (ie gender) and contact phone number (ie mobile) The "@" is used as a concatenation symbol between them, so the value in the query field is gender@mobile.
是以,NoSQL資料庫22儲存有經轉換的員工甲之員工資料(Value)及其資料鍵值(Key),如表9所示,藉此完成更新作業。
Therefore, the
表9:第三實施例之NoSQL資料庫儲存之內容
另一方面,NoSQL資料庫22儲存有經轉換的員工甲之員工資料(Value)及其資料鍵值(Key),其中,NoSQL資料庫22所儲存的員工甲之資料鍵值(Key)可同時包含上述第一實施例、第二實施例及第三實施例所產製的資料鍵值。
On the other hand, the
下列實施例係為本發明之提升常用資料存取效能之系統提供利用SQL語法查詢NoSQL資料庫中的表格資料之第四實施例,且此實施例之主要內容如下,其餘內容相同於上述第一實施例、第二實施例及第三實施例,且一併參閱圖1說明之,於此不再重覆敘述。 The following embodiment is a fourth embodiment of using SQL syntax to query table data in a NoSQL database for the system for improving common data access performance of the present invention, and the main content of this embodiment is as follows, and the rest of the content is the same as the first The embodiment, the second embodiment and the third embodiment are also described with reference to FIG. 1 , and will not be repeated here.
於本實施例中,當NoSQL資料庫中儲存有第一實施例之經轉換的員工甲之資料鍵值(Key)(如表6之Key=securi-
ty:employee:empno:A001)時,SQL語法導入模組16係接收一使用者輸入用以查詢員工資料表中的員工資料之第一SQL語法,其中,第一SQL語法相對應於第一實施例之資料鍵值(Key)。舉例而言,第一SQL語法係為select*from security.employee where empno=A001,其中,第一SQL語法係以One Key-One Data(一關鍵字相對應一表格資料)方式查詢。
In this embodiment, when the NoSQL database stores the data key (Key) of the converted employee A of the first embodiment (such as Key=securi- in Table 6)
ty:employee:empno:A001), the SQL
語法解析轉換模組17針對查詢員工資料表中的員工資料之第一SQL語法進行關鍵字解析,以得到解析資料,其中,解析資料依序包含資料庫之名稱(security)、資料表之名稱(employee)、查詢欄位(*,亦指查詢完整資料)、查詢鍵值(empno)與查詢值域(A001)。
The syntax
再者,查詢鍵值產製模組18依據解析資料並針對NoSQL資料庫22產製符合查詢條件之第一查詢鍵值,例如,security:employee:empno:A001,且查詢鍵值產製模組18利用其產製的查詢鍵值在NoSQL資料庫22查詢出相對應的資料鍵值(如第一實施例之表6之資料鍵值security:employee:empno:A001),以透過經查詢出的資料鍵值從NoSQL資料庫22取出相對應的員工資料表中的員工資料(如第一實施例之表6所示)。
Furthermore, the query
另一實施例中,當NoSQL資料庫中儲存有第二實施例之經轉換的員工甲之資料鍵值(Key)(如表7之Key=securi-ty:employee:empname&office:員工甲&O008)時,SQL語法導入模組16係接收使用者輸入用以查詢員工資料表中的員工資料之第二SQL語法,其中,第二SQL語法相對應於第二實施例之資料鍵值(Key)。舉例而言,第二SQL語法係為select *from security.employee where empname=員工甲and
office=O008,其中,第二SQL語法係以Multiple Key-One Data(多個關鍵字相對應一表格資料)方式查詢。
In another embodiment, when the NoSQL database stores the converted data key of employee A of the second embodiment (eg, Key=securi-ty:employee:empname&office:employee A&O008 in Table 7) , the SQL
語法解析轉換模組17針對查詢員工資料表中的員工資料之第二SQL語法進行關鍵字解析,以得到解析資料,其中,解析資料依序包含資料庫之名稱(security)、資料表之名稱(employee)、查詢欄位(*,亦指查詢完整資料)、查詢鍵值(empname&office)與查詢值域(員工甲&O008)。
The syntax
再者,查詢鍵值產製模組18依據解析資料並針對NoSQL資料庫22產製符合查詢條件之第二查詢鍵值,例如,security:employ-ee:empname&office:員工甲&O008,且查詢鍵值產製模組18利用其產製的查詢鍵值在NoSQL資料庫22查詢出相對應的資料鍵值(如第二實施例之表7之資料鍵值security:employee:empname&office:員工甲&O008),以透過經查詢出的資料鍵值從NoSQL資料庫22取出相對應的員工資料表中的員工資料(如第二實施例之表7所示)。
Furthermore, the query
又一實施例中,當NoSQL資料庫中儲存有第三實施例之經轉換的員工甲之資料鍵值(Key)(如表9之Key=securi-ty:gender@mobile:empno:A001)時,SQL語法導入模組16係接收使用者輸入用以查詢員工資料表中的員工資料之第三SQL語法,其中,第三SQL語法相對應於第三實施例之資料鍵值(Key)。舉例而言,第三SQL語法係為select gender,mobile from security.employee where empno=A001,其中,第三SQL語法係以One Key-One Data(一關鍵字相對應一表格資料)方式查詢。
In another embodiment, when the NoSQL database stores the data key (Key) of the converted employee A of the third embodiment (eg, Key=securi-ty:gender@mobile:empno:A001 in Table 9) , the SQL
語法解析轉換模組17針對查詢員工資料表中的員工資料之第三SQL語法進行關鍵字解析,以得到解析資料,其中,解析資料依序包含資料庫之名稱(security)、查詢欄位(gender@mobile)、查詢鍵值(empno)與查詢值域(A001)。
The syntax
再者,查詢鍵值產製模組18依據解析資料並針對NoSQL資料庫22產製符合查詢條件之第三查詢鍵值,例如,security:-gender@mobile:empno:A001,且查詢鍵值產製模組18利用其產製的查詢鍵值在NoSQL資料庫22查詢出相對應的資料鍵值(如第三實施例之表9之資料鍵值security:gender@mobile:empno:A001),以透過經查詢出的資料鍵值從NoSQL資料庫22取出相對應的員工資料表中的員工資料(如第三實施例之表9所示)。
Furthermore, the query
下列實施例係為本發明之提升常用資料存取效能之系統執行轉換作業的第五實施例,且此執行轉換作業的實施例之主要內容如下,其餘內容相同於第一實施例,且一併參閱圖1說明之,於此不再重覆敘述。 The following embodiment is the fifth embodiment of the system for improving the access performance of common data of the present invention to perform the conversion operation. Referring to FIG. 1 for description, the description will not be repeated here.
於本實施例中,關聯式資料庫21儲存有一員工權限表(如表格資料),且員工權限表之內容以員工編號(即empno)作為唯一關鍵字(One Key)的型態存放在關聯式資料庫21,如表10所示,例如,員工權限表包含資料庫之名稱:security、資料表之名稱:duty、員工編號(即empno)、員工角色(即role)等,但不限於上述。
In this embodiment, the
表10:員工權限表
表格資料分類模組11向關聯式資料庫21取得員工權限表,且對員工權限表進行重要性分類,以產生相對應的具有重要性類型之分類資料,如下表11所示,其中,員工權限表中的重要性類型之等級為A,且員工權限表所要轉換成的資料格式為Set。
The table
表11:員工權限表之分類資料
同步排程處理模組13將員工權限表之分類資料中的重要性類型(A)與更新頻率設定模組12所提供的更新頻率資料(如表3所示)進行匹配,以得到相對應的更新頻率(30秒鐘),且依據更新頻率(30秒鐘)進行排程,其中,員工權限表之更新頻率(30秒鐘)為異動頻率大者,故同步排程處理模組13將員工權限表設定為第一排程,以向表格資料轉換模組14發出執行員工權限表之轉換作業之指示。
The synchronization
表格資料轉換模組14接收到轉換作業之指示後,從更新紀錄資料庫23取得員工權限表在前次轉換的更新紀錄,如表12所示,以依據更新紀錄中的更新範圍(A001)從關聯式資料庫21取得此次需要進行轉換作業之員工權限表中的員工編號(即empno)。
After receiving the instruction of the conversion operation, the table
表12:更新紀錄
表格資料轉換模組14採用一員工編號對應複數員工角色(即role)之執行方式,以透過員工編號(A001)作為更新依據,且確認更新紀錄中的更新範圍(A001)取得此次需要進行轉換作業之員工權限表中的員工角色(即role)。
The form
再者,表格資料轉換模組14更提供使用者設定表格資料之轉換作業所執行的方式(如One Key-Multiple Data之執行方式),進而依據表格資料設定其關鍵字,例如:表格資料轉換模組14提供使用者將員工權限表(如表10所示)中之員工編號(即empno)及其內容(即A001)設定為唯一關鍵字(One Key),以及設定表格資料之轉換範圍(如完整的表格資料)。
Furthermore, the table
接著,表格資料轉換模組14依據設定表格資料之轉換範圍(如完整的表格資料)以及相對應的分類資料中之資料格式(Set型態)將員工權限表中的員工編號(即empno)及員工角色(即role)進行轉換,以產生經轉換的員工編號及員工角色,如表13所示,再存入NoSQL資料庫22中。
Next, the table
表13:經轉換的員工編號及員工角色
資料鍵值產製模組15依據表格資料轉換模組14所設定的員工編號(即empno)及其內容(即A001)為唯一關鍵字(One Key),以及表
格資料之轉換範圍(如完整的表格資料),以採用「第一產製方式」設計一資料鍵值,俾利用經轉換的員工編號及員工角色建立資料鍵值,其中,關於經轉換的員工編號及員工角色之資料鍵值依序包含資料庫之名稱(security)、資料表之名稱(duty)、查詢鍵值(empno)與查詢值域(A001),且各階層中間使用冒號「:」作為分隔符號以形成資料鍵值,例如,經轉換的員工編號及員工角色之資料鍵值係為security:duty:empno:A001。
The data key
是以,NoSQL資料庫22儲存有經轉換的員工編號及員工角色之內容(Value)及其資料鍵值(Key),如表14所示,藉此完成更新作業。
Therefore, the
表14:第五實施例之NoSQL資料庫儲存之內容
在一實施例中,當NoSQL資料庫中儲存有第五實施例之經轉換的員工編號及員工角色之資料鍵值(Key)(如表14之Key=security:duty:empno:A001)時,SQL語法導入模組16係接收使用者輸入用以查詢員工權限表中的員工編號及員工角色之第四SQL語法,其中,第四SQL語法相對應於第五實施例之資料鍵值(Key)。舉例而言,第四SQL語法係為select *from security.duty where empno=A001,其中,第四SQL語法係以One Key-Multiple Data(一關鍵字相對應多個表格資料)方式查詢。
In one embodiment, when the NoSQL database stores the data keys (Key) of the converted employee numbers and employee roles of the fifth embodiment (such as Key=security:duty:empno:A001 in Table 14), The SQL
語法解析轉換模組17針對查詢員工權限表中的員工編號及員工角色之第四SQL語法進行關鍵字解析,以得到解析資料,其中,解析
資料依序包含資料庫之名稱(security)、資料表之名稱(duty)、查詢欄位(*,亦指查詢所有欄位)、查詢鍵值(empno)與查詢值域(A001)。
The syntax
再者,查詢鍵值產製模組18依據解析資料並針對NoSQL資料庫22產製符合查詢條件之第四查詢鍵值,例如,security:duty:empno:A001,且查詢鍵值產製模組18利用其產製的查詢鍵值在NoSQL資料庫22查詢出相對應的資料鍵值(如表14之資料鍵值security:duty:empno:A001),以透過經查詢出的資料鍵值從NoSQL資料庫22取出相對應的員工編號及員工角色(如第五實施例之表14所示)。
Furthermore, the query
圖2係為本發明之提升常用資料存取效能的方法流程示意圖,此提升常用資料存取效能的方法流程之主要內容如下,其餘內容相同於上述圖1說明,於此不再重覆敘述,其中,該方法流程包含下列步驟S21至步驟S211: FIG. 2 is a schematic flowchart of the method for improving the access performance of common data according to the present invention. The main content of the method for improving the access performance of common data is as follows, and the rest of the content is the same as that described in FIG. Wherein, the method flow includes the following steps S21 to S211:
於步驟S21中,由同步排程處理模組13確認執行來源是否為排程作業,若是則進至步驟S22,反之則進至步驟S29。
In step S21, the synchronization
於步驟S22中,若執行排程作業,則同步排程處理模組13從表格資料分類模組11取得具有重要性類型之複數分類資料。
In step S22 , if the scheduling operation is executed, the synchronous
於步驟S23中,同步排程處理模組13從更新頻率設定模組12取得更新頻率資料。
In step S23 , the synchronization
於步驟S24中,當表格資料轉換模組14接收同步排程處理模組13依據具有重要性類型之複數分類資料與更新頻率資料依序發出執行複數表格資料之轉換作業之指示後,從更新紀錄資料庫23取得複數表格資料於前次轉換的更新紀錄。
In step S24, when the table
於步驟S25中,表格資料轉換模組14從關聯式資料庫21取得複數表格資料。
In step S25 , the table
於步驟S26中,表格資料轉換模組14依據更新紀錄之更新範圍確定此次轉換作業需要轉換的複數表格資料之範圍,以依據複數表格資料相對應的分類資料中之資料格式進行轉換作業,產生該些經轉換的表格資料。
In step S26, the table
於步驟S27中,資料鍵值產製模組15依據來自表格資料轉換模組14的該些經轉換的表格資料,以建立在NoSQL資料庫22中查詢該些經轉換的表格資料所使用的資料鍵值。
In step S27, the data key
於步驟S28中,NoSQL資料庫22儲存該些經轉換的表格資料及其相對應的資料鍵值,以供使用者透過資料鍵值查詢並取得該些經轉換的表格資料。
In step S28, the
於步驟S29中,若非執行排程作業,則SQL語法導入模組16接收一使用者輸入用以查詢表格資料之SQL語法。
In step S29, if the scheduled operation is not executed, the SQL
於步驟S210中,語法解析轉換模組17接收來自SQL語法導入模組16的用以查詢表格資料之SQL語法,進行關鍵字解析以得到解析資料。
In step S210, the syntax
於步驟S211中,查詢鍵值產製模組18接收來自語法解析轉換模組17的解析資料,以依據解析資料產製符合查詢條件之查詢鍵值,俾利用查詢鍵值從NoSQL資料庫22查詢出相對應的資料鍵值,進而得到資料鍵值相對應的該些經轉換的表格資料之至少一者。
In step S211, the query
此外,本發明還揭示一種電腦可讀媒介,係應用於具有處理器(例如,CPU、GPU等)及/或記憶體的計算裝置或電腦中,且儲存有指令,並可利用此計算裝置或電腦透過處理器及/或記憶體執行此電腦可讀媒介,以於執行此電腦可讀媒介時執行上述之方法及各步驟。 In addition, the present invention also discloses a computer-readable medium, which is applied to a computing device or computer having a processor (eg, CPU, GPU, etc.) and/or memory, and stores instructions, and can utilize the computing device or computer. The computer executes the computer-readable medium through a processor and/or a memory, so as to execute the above-mentioned methods and steps when executing the computer-readable medium.
綜上所述,本發明係提供一種提升常用資料存取效能之系統與方法及其電腦可讀媒介,透過將對關聯式資料庫內容進行表格資料之重要性分類,藉此設定表格資料更新頻率,且主動定時排程以將關聯式資料庫中的表格資料轉換至NoSQL資料庫中。因此,不但能提供與高階商用資料庫相同之服務水準,更能提升常用資料的存取效能,達成整合運用關聯式資料庫與NoSQL資料庫,以有效分流前端進入的負載,提升應用服務整體回應效能表現。 In summary, the present invention provides a system and method for improving the access performance of common data and a computer-readable medium thereof. By classifying the importance of the table data on the content of the relational database, the update frequency of the table data is set. , and actively schedule to convert table data in relational database to NoSQL database. Therefore, it can not only provide the same service level as high-end commercial databases, but also improve the access performance of commonly used data, achieve the integration of relational databases and NoSQL databases, effectively offload the load of front-end entry, and improve the overall response of application services. performance.
此外,本發明亦提出SQL語法解析轉換技術,使得原本採用關聯式資料庫的應用程式不需更動原始的SQL語法,即能於NoSQL資料庫中存取內容,降低程式平台移轉需要的時間與提升系統整體彈性。 In addition, the present invention also proposes a SQL syntax parsing and conversion technology, so that the application program originally using the relational database can access the content in the NoSQL database without changing the original SQL syntax, reducing the time and time required for the program platform transfer. Improve the overall flexibility of the system.
再者,本發明之提升常用資料存取效能之系統、方法及其電腦可讀媒介相較於現有技術,至少具有以下技術差異及其功效: Furthermore, compared with the prior art, the system, method and computer-readable medium for improving common data access performance of the present invention have at least the following technical differences and effects:
一、本發明提出排程分類設定技術,針對關聯式資料庫中的表格資料進行重要性及更新頻率分類,以依據表格資料之重要性主動定時排程,俾將表格資料轉換至NoSQL資料庫,故相較於習知技術需要即時同步關聯式資料庫與NoSQL資料庫之間的所有資料,本發明依據重要性來更新資料,不但能降低系統的負擔,更提升整體工作效率。 1. The present invention proposes a scheduling classification setting technology to classify the importance and update frequency of the table data in the relational database, so as to actively schedule the table data according to the importance of the table data, so as to convert the table data to the NoSQL database, Therefore, compared with the prior art that needs to synchronize all the data between the relational database and the NoSQL database in real time, the present invention updates the data according to the importance, which can not only reduce the burden of the system, but also improve the overall work efficiency.
二、本發明提出表格資料轉換技術,將關聯式資料庫內容透過增量更新的方式轉換至NoSQL資料庫,提供與高階商用資料庫相同之服務水準。 2. The present invention proposes a table data conversion technology, which converts the content of the relational database to the NoSQL database through incremental updating, and provides the same service level as the high-end commercial database.
三、本發明提出鍵值查詢產製技術,針對儲存於關聯式資料庫中的表格資料產製其相對應的資料鍵值,以透過資料鍵值提供使用者查詢儲存於NoSQL資料庫中經轉換的表格資料。 3. The present invention proposes a key-value query production technology, which produces the corresponding data key value for the table data stored in the relational database, so as to provide user query through the data key value, which is stored in the NoSQL database after conversion form data.
四、本發明提出語法解析轉換技術,自動解析應用程式原始SQL語法,不需調整程式即可取得NoSQL資料庫中經轉換的表格資料。 Fourth, the present invention proposes a syntax parsing conversion technology, which automatically parses the original SQL syntax of the application program, and can obtain the converted table data in the NoSQL database without adjusting the program.
上述實施形態僅例示性說明本發明之原理及其功效,而非用於限制本發明。任何熟習此項技藝之人士均可在不違背本發明之精神及範疇下,對上述實施形態進行修飾與改變。因此,本發明之權利保護範圍應如申請專利範圍所列。 The above-mentioned embodiments merely illustrate the principles and effects of the present invention, but are not intended to limit the present invention. Any person skilled in the art can modify and change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention should be listed in the scope of the patent application.
1:提升常用資料存取效能之系統 1: A system to improve the performance of common data access
11:表格資料分類模組 11: Form data classification module
12:更新頻率設定模組 12: Update frequency setting module
13:同步排程處理模組 13: Synchronous scheduling processing module
14:表格資料轉換模組 14: Form data conversion module
15:資料鍵值產製模組 15: Data key value production module
16:SQL語法導入模組 16: SQL syntax import module
17:語法解析轉換模組 17: Syntax parsing conversion module
18:查詢鍵值產製模組 18: Query key-value production module
21:關聯式資料庫 21: Associative database
22:NoSQL資料庫 22: NoSQL Repository
23:更新紀錄資料庫 23: Update record database
Claims (17)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110125879A TWI766757B (en) | 2021-07-14 | 2021-07-14 | A system and a method for improving access performance of frequently used data and computer readable medium thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110125879A TWI766757B (en) | 2021-07-14 | 2021-07-14 | A system and a method for improving access performance of frequently used data and computer readable medium thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI766757B true TWI766757B (en) | 2022-06-01 |
TW202303413A TW202303413A (en) | 2023-01-16 |
Family
ID=83103603
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW110125879A TWI766757B (en) | 2021-07-14 | 2021-07-14 | A system and a method for improving access performance of frequently used data and computer readable medium thereof |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI766757B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI430116B (en) * | 2011-06-20 | 2014-03-11 | Chunghwa Telecom Co Ltd | Support for editing methods with multiple data formats |
US9009140B2 (en) * | 2012-09-28 | 2015-04-14 | Sap Se | Optimization of database query |
CN105224544A (en) * | 2014-05-30 | 2016-01-06 | 北大方正集团有限公司 | A kind of data editing method of database and device |
CN105357201A (en) * | 2015-11-12 | 2016-02-24 | 中国科学院信息工程研究所 | Access control method and system for object cloud storage |
CN110989983A (en) * | 2019-11-28 | 2020-04-10 | 深圳航天智慧城市系统技术研究院有限公司 | Zero-coding application software rapid construction system |
-
2021
- 2021-07-14 TW TW110125879A patent/TWI766757B/en active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI430116B (en) * | 2011-06-20 | 2014-03-11 | Chunghwa Telecom Co Ltd | Support for editing methods with multiple data formats |
US9009140B2 (en) * | 2012-09-28 | 2015-04-14 | Sap Se | Optimization of database query |
CN105224544A (en) * | 2014-05-30 | 2016-01-06 | 北大方正集团有限公司 | A kind of data editing method of database and device |
CN105357201A (en) * | 2015-11-12 | 2016-02-24 | 中国科学院信息工程研究所 | Access control method and system for object cloud storage |
CN110989983A (en) * | 2019-11-28 | 2020-04-10 | 深圳航天智慧城市系统技术研究院有限公司 | Zero-coding application software rapid construction system |
Also Published As
Publication number | Publication date |
---|---|
TW202303413A (en) | 2023-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112567358B (en) | Querying external tables in a database system | |
EP3513317B1 (en) | Data serialization in a distributed event processing system | |
US11023486B2 (en) | Low-latency predictive database analysis | |
CN112567357B (en) | Automatic maintenance of external data tables | |
US9460188B2 (en) | Data warehouse compatibility | |
US11347728B2 (en) | Notifying modifications to external tables in database systems | |
US20130311454A1 (en) | Data source analytics | |
US11580147B2 (en) | Conversational database analysis | |
KR20150039118A (en) | Background format optimization for enhanced sql-like queries in hadoop | |
CN103631870A (en) | System and method used for large-scale distributed data processing | |
US20210089532A1 (en) | Cloud based query workload optimization | |
CN116361487A (en) | Multi-source heterogeneous policy knowledge graph construction and storage method and system | |
Zou et al. | From a stream of relational queries to distributed stream processing | |
Pokorný | Integration of relational and NoSQL databases | |
TWI766757B (en) | A system and a method for improving access performance of frequently used data and computer readable medium thereof | |
US8442934B2 (en) | Query and result rebinding | |
Azzam et al. | Towards making distributed rdf processing flinker | |
US11928096B2 (en) | Systems and methods using generic database search models | |
US20240012827A1 (en) | Cleaning and organizing schemaless semi-structured data for extract, transform, and load processing | |
Gidado et al. | Maximizing Bigdata Retrieval: Block as a Value for NoSQL over SQL |