TWI245202B - Method for obtaining and releasing database access resource in information system - Google Patents

Method for obtaining and releasing database access resource in information system Download PDF

Info

Publication number
TWI245202B
TWI245202B TW093107274A TW93107274A TWI245202B TW I245202 B TWI245202 B TW I245202B TW 093107274 A TW093107274 A TW 093107274A TW 93107274 A TW93107274 A TW 93107274A TW I245202 B TWI245202 B TW I245202B
Authority
TW
Taiwan
Prior art keywords
database
connection
release
patent application
scope
Prior art date
Application number
TW093107274A
Other languages
Chinese (zh)
Other versions
TW200532492A (en
Inventor
Horng-Ru Lin
Original Assignee
Shinewave Int Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shinewave Int Inc filed Critical Shinewave Int Inc
Priority to TW093107274A priority Critical patent/TWI245202B/en
Publication of TW200532492A publication Critical patent/TW200532492A/en
Application granted granted Critical
Publication of TWI245202B publication Critical patent/TWI245202B/en

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a method for obtaining and releasing database access resource in information system, which includes the following steps: providing a connection management object and a database access interface object, in which the database access interface object is able to employ the functions provided in the connection management object for obtaining and releasing the database connection; using the database access interface object for the process of obtaining and releasing the PreparedStatement and the ResultSet; and, executing the application program on the web server to inherit all the functions in the database access interface object for the operations of obtaining and releasing database access resource.

Description

1245202 五、發明說明(1) 發明所屬之技術領域 本發明係關於管控資料庫的方法,其特別係關於在資 訊系統中,取得與釋放資料庫存取資源的方法。 先前技術1245202 V. Description of the invention (1) The technical field to which the invention belongs The present invention relates to a method for managing and controlling a database, and in particular, it relates to a method for obtaining and releasing a data library to obtain resources in an information system. Prior art

在一般資訊系統的運作過程中,大都會有存取資料庫 的動作,而在存取資料庫時,必須先取得資料庫連線 (Connection),利用資料庫連線建立可執行資料庫指令的 物件(例如PreparedStatement),接著執行資料庫指令物 件來取得執行後的結果(Result Set),並在存取完畢後將 先前所使用的相關系統資源釋放〈包含:連線物件、指令 物件以及結果集合物件〉。因此,資訊系統在與資料庫進 行互動時,必需耗費大量系統資源,此一動作往往也是造 成資訊系統效能瓶頸所在。In the operation process of general information systems, most of them have the action of accessing the database. When accessing the database, you must first obtain the database connection, and use the database connection to create executable database commands. Object (such as PreparedStatement), then execute the database command object to obtain the result (Result Set), and release the related system resources previously used after access (including: connection object, command object, and result set object>. Therefore, when the information system interacts with the database, it must consume a large amount of system resources. This action often causes the bottleneck of the performance of the information system.

習知資訊系統在取得資料庫存取資源的作法,分述如 下:第一類作法乃是在需要進行資料庫存取的位置撰寫資 料庫存取程式,此種作法的缺點是資料庫存取程式將會散 佈在整個資訊系統中,缺乏統籌控管的機制,如遇到資訊 系統要更換不同資料庫時,將需要修改所有散佈在系統中 的資料庫存取程式,造成系統維護上的困擾。第二類作法 乃是以一個獨立的子系統來處理資料庫連線的取得與釋 放,然而該獨立的子系統所能具備的功能只有針對資料庫 連線資源,至於其他資源則不做控管,此種作法並未全盤 考量在對資料庫存取過程中,除資料庫連線外,還需要使The practice of the conventional information system in obtaining data inventory and resources is described as follows: The first type of practice is to write the data inventory access program at the location where the data inventory access is needed. The disadvantage of this approach is that the data inventory access program will be distributed. In the entire information system, there is a lack of overall control and management mechanism. If the information system needs to change different databases, it will need to modify all the data library access programs scattered in the system, causing system maintenance troubles. The second type of approach is to use a separate subsystem to handle the acquisition and release of database connections. However, the independent subsystem can only function for database connection resources, and other resources are not controlled. This approach does not take into consideration in the process of fetching the data inventory, in addition to the connection of the database, you also need to use

第5頁 1245202 五、發明說明(2) 用其他相關的系統資源,例如必須有指令物件以及資料集 合物件配合才能完成資料庫的存取動作,而第二類作法常 會導致系統資源釋放不完全,輕則造成執行效能下降,重 則導致系統當機。 本發明的發明人有鑑於上述習知缺失,乃亟思發明一 種在資訊系統中,對於所有資料庫的存取資源達成統籌控 管與完全釋放的方法。 發明内容 本發明目的係提供一種在資訊系統中,取得與釋放存 取資料庫所需資源的方法,透過本方法的運作,將可獲得 統籌控管、完全釋放系統資源、提升資訊系統運作效率及 不受資料庫系統變更而需修改程式的優點。 為達成本發明上述目的,本發明提供一種用於資訊系 統中取得與釋放資料庫存取資源的方法,包括下列步驟: 提供連線管理物件以及資料庫存取介面物件,其中資料庫 存取介面物件係能夠使用在連線管理物件中所提供的功 能,對資料庫進行連線(Connection)的取得與釋放,而資 料庫存取介面物件係用於處理指令物件 (PreparedStatement)以及資料集合物件(ResultSet)的取 得與釋放;令執行於網站伺服器的應用程式利用繼承在資 料庫存取介面物件中所有功能的方式,來對資料庫存取資 源進行取得與釋放。Page 5 12452202 V. Description of the invention (2) Use other related system resources, such as instruction objects and data collection objects, to complete database access. The second type of practice often results in incomplete release of system resources. The lightest cause the execution performance to decline, and the worst cause the system to crash. The inventor of the present invention, in view of the lack of the above-mentioned knowledge, is desperately inventing a method for achieving overall control and complete release of access resources of all databases in an information system. SUMMARY OF THE INVENTION The object of the present invention is to provide a method for obtaining and releasing resources required to access a database in an information system. Through the operation of this method, integrated control and management can be obtained, system resources can be completely released, and the operation efficiency of the information system can be improved. The advantage of not having to change the database system and need to modify the program. In order to achieve the above-mentioned object of the present invention, the present invention provides a method for obtaining and releasing data database access resources in an information system, including the following steps: providing a connection management object and a data database access interface object, wherein the data database access interface object is capable of Use the functions provided in the connection management object to obtain and release the connection of the database (Connection), and the database access interface object is used to process the command object (PreparedStatement) and the data collection object (ResultSet) And release; make the application running on the web server use the inheritance of all the functions in the database access interface object to obtain and release the database access resources.

1245202 五、發明說明(3) 為使熟悉該項技藝人士瞭解本發明之目的、特徵及功 效,茲藉由下述具體實施例,並配合所附之圖式,對本發 明詳加說明,說明如后: 實施方式 一般而言,資訊系統中對資料庫的存取動作大致可分 為資料查詢指令,例如s e 1 e c t指令,以及資料更新指令, 例如u p d a t e、d e 1 e t e等指令。以資料查詢指令為例,一個 完整的資料庫存取動作至少包含以下五個階段: 階段一:取得資料庫連線物件(Connection)。 階段二:由連線物件中取得資料庫指令物件 (PreparedStatement) ° 階段三:執行指令物件中的資料庫指令(SQL Command), 並取得執行結果的資料集合物件(Res ul t Set)。 階段四:取出資料集合物件中的資料進行處理。 階段五:釋放以上步驟中所使用的資料庫存取資源,例如 釋放出連線物件、指令物件以及資料集合物件。 在一個線上的資訊系統中,可能在同一個時間有上萬 個使用者同時使用著資料庫,因此,資訊系統必須能夠有 效的處理大量的資料庫存取的動作〈同時執行上萬次階段 一到階段五的動作〉,稍一不慎〈資源釋放不完全〉即可 造成系統資源耗盡,導致系統當機,由此可見資料庫存取 方法的設計對整個資訊系統的運作影響甚巨,下文將針對 本發明配合實例運作進行詳細的說明。1245202 V. Description of the invention (3) In order to make those skilled in the art understand the purpose, features and effects of the present invention, the following specific embodiments and the accompanying drawings are used to explain the present invention in detail. After: Implementation In general, the access operation to the database in the information system can be roughly divided into data query instructions, such as se 1 ect instructions, and data update instructions, such as update, de 1 ete and other instructions. Taking the data query command as an example, a complete database retrieval operation includes at least the following five phases: Phase 1: Obtain a database connection object (Connection). Phase 2: Obtain the database command object (PreparedStatement) from the connection object ° Phase 3: Run the database command (SQL Command) in the command object and obtain the data set object (Result Set) of the execution result. Phase 4: Fetch the data in the data collection object for processing. Phase 5: Release the database access resources used in the above steps, such as releasing connection objects, command objects, and data collection objects. In an online information system, there may be tens of thousands of users using the database at the same time at the same time. Therefore, the information system must be able to effectively handle a large number of database access operations (at the same time tens of thousands of stage one to one Phase 5 actions ", a little carelessness (incomplete release of resources) can cause system resources to be exhausted, causing the system to crash. It can be seen that the design of the data library access method has a great impact on the operation of the entire information system. The operation of the present invention in cooperation with examples will be described in detail.

1245202 五、發明說明(4)1245202 V. Description of the invention (4)

第一圖顯示本發明方法的流程圖,以及第二圖顯示應 用本發明方法的資訊系統示意圖。本發明用於資訊系統中 取得與釋放資料庫存取資源的方法1 0主要包括有步驟 (1 0 1 )與步驟(1 0 3 ),分別詳細說明如下。步驟(1 0 1 )係提 供連線管理物件5 0以及資料庫存取介面物件6 0,而資料庫 存取介面物件6 0係能夠使用在連線管理物件5 0中所提供的 功能,以及連線管理物件5 0係至少用於對資料庫3 0進行連 線的取得與釋放,而資料庫存取介面物件6 0係用來處理指 令物件(PreparedStatement)以及資料集合物件 (ResultSet)的取得與釋放。具體而言,連線管理物件50 以及資料庫存取介面物件60的主要目的就是用來實現上述 的五個階段的資料庫存取動作,請配合參見第三圖顯示之 連線管理物件與資料庫存取介面物件的架構關係圖。在本 發明中,資料庫3 0連線取得與釋放,主要是藉由兩個核心 物件來控制,即為資料庫存取介面物件6 0與及連線管理物 件5 0。在對資料庫3 0取得存取資源的過程中,連線物件的 取得可說是最重要的關鍵之一,因為不同資料庫A、B必須 使用不同的驅動程式模組來取得連線物件,一旦連線物件 取得之後,即可利用該物件來取得執行資料庫指令所需的 指令物件。因此,本發明的資料庫存取介面物件60乃提供 一組標準的連線資源取得以及釋放所有資源的功能,諸如 釋放連線物件、指令物件以及資料集合物件,來讓資訊系 統的其他物件使用。至於如何實際地去取得連線資源的動 作,則完全由連線管理物件5 0來處理,也就是說,資料庫The first diagram shows a flowchart of the method of the present invention, and the second diagram shows a schematic diagram of an information system applying the method of the present invention. The method 10 for obtaining and releasing a data library and resource in an information system according to the present invention mainly includes steps (1 0 1) and (1 0 3), which are described in detail below respectively. Step (1 0 1) is to provide the connection management object 50 and the database access interface object 60, and the database access interface object 60 can use the functions provided in the connection management object 50 and the connection The management object 50 is used to at least obtain and release the connection to the database 30, and the database access interface object 60 is used to handle the acquisition and release of the command object (PreparedStatement) and the data collection object (ResultSet). Specifically, the main purpose of the connection management object 50 and the data library access interface object 60 is to realize the above-mentioned five stages of the data library access operation. Please refer to the connection management object and the data library access shown in the third figure. Diagram of the architecture of interface objects. In the present invention, the acquisition and release of the database 30 connection is mainly controlled by two core objects, namely, the interface object 60 and the connection management object 50 for the database. In the process of obtaining access resources to database 30, the acquisition of connection objects is one of the most important keys, because different databases A and B must use different driver modules to obtain connection objects. Once the connection object is obtained, it can be used to obtain the command object required to execute the database command. Therefore, the database access interface object 60 of the present invention provides a standard set of functions for obtaining connection resources and releasing all resources, such as releasing connection objects, command objects, and data collection objects for use by other objects of the information system. As for how to actually obtain the connection resource, it is completely handled by the connection management object 50, that is, the database

第8頁 1245202Page 8 1245202

五、發明說明(5) 存取介面物件6 0中取得與釋放連線資源的功能,其實際± 的運作方式乃是呼叫執行連線管理物件5 0中相對應的功 能。透過連線管理物件5 0與資料庫存取介面物件6 〇的分工 負責,讓本發明的連線管理物件50來負責資料庫3〇連線的 取得與釋放,以及讓資料庫存取介面物件6 0則是處理指令 物件以及資料集合物件的取得與釋放。 7 再者,由於不同資料庫取得連線的方式均不相同,你】 如第三圖所顯示的資料庫A與資料庫B,因此在更換資料庫 時只需抽換連線管理物件5 0即可,資訊系統其他部分均不 受其影響。此外,資訊系統中其他物件,例如第三圖所顯 示的系統應用物件7 0 ,例如系統應用物件P與系統應用物 件Q,其在對資料庫3 0進行存取時,只需繼承資料庫存取 介面物件6 0即可擁有該物件中取得資料庫連線與釋放系統 資源的所有功能。 ' 步驟(1 0 3 )係令執行於網站伺服器2 0的應用程式2 〇 i利 用繼承在資料庫存取介面物件60中所有功能的方式,來對 資料庫3 0進行存取資源的取得與釋放。請配合參見第四圖 係依據第三圖實作的具體實施例,在資訊系統中,應用程 式201的StudentHandler物件在需要存取資料庫30時,可 以利用StudentDAO 物件中的getAllStudent ()或 deleteOneStudent ()功能,請注意到這些功能在執行 時’必須使用到資料庫存取介面物件6 〇以及再由連線物件 中取彳于的其他物件例如PreparedStatement的功能以及 Resu 1 tSet的功能’因此,Student])A〇物件乃利用繼承的V. Description of the invention (5) The function of obtaining and releasing the connection resources in the access interface object 60 is to call and execute the corresponding function in the connection management object 50. Through the division of labor between the connection management object 50 and the data library access interface object 60, the connection management object 50 of the present invention is responsible for the acquisition and release of the database 30 connection, and the data database access interface object 60 It is the acquisition and release of processing instruction objects and data collection objects. 7 Furthermore, because the methods of obtaining connections for different databases are different, you] As shown in the third figure, database A and database B, so you only need to swap the connection management objects when replacing the database 5 0 Yes, the rest of the information system is unaffected. In addition, other objects in the information system, such as the system application object 70 shown in the third figure, such as the system application object P and the system application object Q, need only inherit the data library to access the database 30 The interface object 60 can have all the functions of obtaining database connection and releasing system resources in the object. 'Step (103) is to make the application 2 running on the web server 20 use the way of inheriting all the functions in the database access interface object 60 to obtain and access the database 30 access resources. freed. Please refer to FIG. 4 for a specific embodiment implemented according to the third figure. In the information system, when the StudentHandler object of the application 201 needs to access the database 30, the getAllStudent () or deleteOneStudent ( ) Function, please note that these functions 'must use the database access interface object 6 〇 and other objects retrieved from the connected object such as the function of PreparedStatement and the function of Resu 1 tSet'. Therefore, [Student] A) Objects are inherited

1245202 \)/ 6 /(V 明 說 明 發 五 i c D ( Γ t t θ 6 n t η s e η e 為 dIe G β u d 寻stotu 冬女oo t 獲例在es來,,on ,能說te 式功是le 方的就le d 源也 資, \ly 有 所C 放se 釋ea 與el 線, 得 取C 中η 件10 物ct ο 6 An 及 以 c η de u G t 用 s 1使 I * A可 t e, g 的中 件能 物功 或 中 件 物 資 o 線A D 連c 得Γ 取ne 來Ge x)y , c者 _n4T n肩 r ne資 °;n tc所 ge放 的釋 源 時—資 #0對與 執相件 在中物 }件令 C物指 η 〇放 10ΡΟ釋 tn祭 C ο netl實 n C 了 oe cln除 t η p eobb get 物1245202 \) / 6 / (V indicates that the five ic D (Γ tt θ 6 nt η se η e is dIe G β ud to find the stotu winter girl oo t. For example, come from es, on, can say that the te formula is The source of le is also the source of d. \ ly has C and se releases the ea and el lines. You can get η pieces of 10 in C, ct 6 An, and c η de u G t with s 1 to make I * A. But te, g's middleware energy work or middleware materials o line AD and c can get Γ take ne to Ge x) y, c is _n4T n shoulder r ne ° °; n tc when the release source — ### Pairs with the holders in the middle of the order} C order refers to η 〇 put 10ΡΟ release tn Festival C ο netl real n C oe cln except t η p eobb get things

Sr的 用,中 件 來 c e 6 r f 的 中 11 ο ο ρ η ο • 1 t C e 實 ,的料 應資ηη 際 功集 上’物 際能合 用1 , eh 使 Γ 夕 是而件 用 使 會 還 功 t ο 作 實 的 件 物 線 4gc 放 釋 與 得 取 於 由 〇 件 物 線 放 釋 來 能 來能 件功 >01物的 〇 PAO放 i n D — t ο C 麥 a i i&、 t t Γ ^ Π c e导 e 6 n m n e fe· e n G s· plco用源 im用利資 <利且庫 差中 所件 有物 而這 B在 V 庫褐 料異 資差 同些 不這 為將 因件 會物 異 並 料 資庫 準料 標資 的換 要更 需要 所需 統到 系遇 訊來 資將 供倘 提, 其的 中護 統維 系於 訊易 資管 ,控 可籌 即統 件致 物獲 01全 P0完 on明 tl發 ec本 η , Co響 換影 替受 只不 僅均 僅件 ,物 時他 ¾ 優 實與 體件 具物 的線 放連 釋得 與取 得的 取件 線物 連面 的介 件取 物存 理庫 管料 線資 連示 示顯 顯圖 圖六 五第 第, 例 施 系 示 顯 圖際 七實 第為 及係 以示 ,顯 例所 施圖 實五 體第 具。 的例 源施 資實 有體 所具 統的 系件 訊物 資用 放應 釋統 片的 式件 程物 的線 件連 物放 線釋 連與 放線 釋連 與得 線取 連中 得件 取物 中1 ο 件Q 物η 11 ·1 o t 0 c ρ Θ η η ο η 1 ο t C C在 e名 η , :0η段The use of Sr, the middle piece to ce 6 rf of the middle 11 ο ο ρ η ο • 1 t C e Real, the material should be ηη on the international power set 'interactive energy use 1', eh so that Γ Xi is necessary and the use of Will return work t ο the actual release of the object line 4gc release and can be obtained from the release of the ○ item line can be achieved by the ○ PAO release in D — t ο C Mai ai i &, tt Γ ^ Π ee 6 nmne fe · en G s · plco source im use profit < all the items in the inventory difference and this B is the same as the difference in brown inventory difference in the V library. Due to the fact that the materials will be different and the materials and materials are expected to be exchanged, the standard capital needs to be more necessary to be met. If the incoming funds are to be provided, its middle protection is maintained in Xunyi Asset Management. The piece of the product won 01 full P0 on the Ming tl issue ec this η, the Co ring and change the role of not only are only the pieces, when he ¾ 实 excellent real and physical items on-line release and release and obtain the pick Line-to-face connection, material collection, storage, storage, management, library, material, line, resource, display, display, and display. And to show lines, the applied embodiment of FIG substantially solid section having five bodies. The source of the asset management system has the material information. The material is used to release the piece of the process. The wire is connected to the wire. The wire is connected to the wire. The wire is connected to the wire. ο pieces of Q η 11 · 1 ot 0 c ρ Θ η η ο η 1 ο t CC in e name η,: 0η segment

第10頁 1245202 五、發明說明(7) 程式會因為使用不同的資料庫而有所差異,其原因乃是因 為不同的資料庫必須使用不同的驅動程式模組來取得與釋 放連線物件。在第六圖中,GenericDAO物件中取得連線物 件與釋放系統所有資源的程式片段,可以顯明地看見 GenericDAO物件中取得與釋放連線物件的功能實際上是去 呼叫C ο η n e c t i ο η Ρ ο ο 1物件中相對應的功能,而資訊系統中 所有資源,其主要包含有Connection、Page 10 1245202 V. Description of the invention (7) The program will be different due to the use of different databases. The reason is that different databases must use different driver modules to obtain and release the connected objects. In the sixth figure, the program fragment of the GenericDAO object to obtain the connection object and release all the resources of the system. It can be clearly seen that the function of obtaining and releasing the connection object in the GenericDAO object is actually to call C ο η necti ο η Ρ ο ο 1 corresponding function in the object, and all resources in the information system mainly include Connection,

PreparedStatement以及ResultSet等,釋放該所有資源則 是在GenericDAO的release ()功能中進行。在第七圖 中,由於StudentDAO物件繼承了GenericDAO物件中所有的 功能,因此,在StudentDAO物件的getAllStudent ()功 能中可啤叫使用GenericDAO物件中的getConnection () 取得連線物件,並利用r e 1 e a s e ()功能來釋放其他的系 統資源,例如為ResultSet 以及PreparedStatement 等。 本發明上述的網站伺服器2 0其具體範例可以是網頁伺服器 (W e b S e r v e r ),其透過網路,例如網際網路,與至少_個 以上的用戶端電腦40連接,本發明的方法10可以編寫為程 式碼而執行於網站伺服器2 0。用戶端電腦4 0能夠執行潘彳 器(B r 〇 w s e r )軟體透過網頁伺服器,讓網頁伺服器執行實/ 現本發明方法1 〇的程式碼來對至少一個以上的遠端資料 30存取到記錄(record)。 , 從以上的揭露可以對本發明進行了解,本發明顯明 具備以下所述的優點: 1·提供資訊系統統籌控管與完全釋放資料庫存取資源%PreparedStatement, ResultSet, etc., all resources are released in the release () function of GenericDAO. In the seventh figure, because the StudentDAO object inherits all the functions in the GenericDAO object, in the getAllStudent () function of the StudentDAO object, you can call getConnection () in the GenericDAO object to obtain the connection object, and use re 1 ease () Function to release other system resources, such as ResultSet and PreparedStatement. A specific example of the foregoing web server 20 of the present invention may be a web server (Web Server), which is connected to at least one or more client computers 40 through a network, such as the Internet. The method of the present invention 10 can be written as code and run on web server 2 0. The client computer 40 can execute the software of Browsing (Browsing) through the web server, and let the web server execute the code implementing / implementing the method 10 of the present invention to access and record at least one or more remote data 30. (Record). According to the above disclosure, the present invention can be understood, and the present invention has the following advantages: 1. Provides information system for overall control and management and complete release of data inventory for resource%

1245202 五、發明說明(8) 點。 2 .降低資料庫資源管理設計製作的複雜度。 3 ·在資料庫存取物件中提供標準的存取介面,隔絕資料庫 存取程式與系統中其他物件彼此間的相依性,在轉換不同 資料庫系統時,可在不更動其他子系統的狀況下,彈性抽 換資料庫驅動程式模組。 經由上述本發明的揭露說明,凡熟悉該項技術者業能 了解本發明精神所在。一般而言,資訊系統在存取資料庫 的過程中通常會使用到三種物件,這三種物件分別是:連 線物件〈Connection〉、指令物件〈Statement〉以及結 果集合物件〈ResultSet〉。而在進行完資料庫存取動作 之後,必須將這三種物件所佔據的資源進行釋放,以便讓 後續需要進行資料庫存取的程式可以使用。本發明的精 神,主要是使用兩個物件(連線管理物件5 0與資料庫存取 介面物件6 0 )來管理上述三種資源,期望達到一個統籌控 管、容易維護以及完全釋放系統資源的方法。本發明再予 以強調,本發明的運作方式主要是利用一個介面物件提供 一組資料庫存取的功能’讓資訊系統中需要進行資料庫存 取的程式,透過繼承的方式來使用(繼承該物件即可擁有 該物件中的資料庫存取功能)。資訊系統中所要需要進行 資料庫存取的程式,均透過繼承該物件的方式,取得一致 性的資料庫存取方法,透過這些方法來存取資料庫,而實 際取得或釋放資源的程式碼則統一由介面物件來控管。由 於連線物件的取得與釋放方式會因為使用的資料庫不同而1245202 V. Description of the invention (8) point. 2. Reduce the complexity of database resource management design and production. 3 · Provide a standard access interface in the database access object to isolate the dependencies between the database access program and other objects in the system. When converting different database systems, you can change the other subsystems without changing Flexible swap database driver module. Through the above disclosure of the present invention, those skilled in the art can understand the spirit of the present invention. Generally speaking, the information system usually uses three kinds of objects in the process of accessing the database. These three kinds of objects are: connection object (Connection), command object (Statement), and result collection object (ResultSet). After the data library fetch operation is completed, the resources occupied by these three objects must be released, so that subsequent programs that need to fetch the data library can be used. The spirit of the present invention mainly uses two objects (connection management object 50 and database access interface object 60) to manage the above three resources, and it is expected to achieve a method of integrated control, easy maintenance and complete release of system resources. The present invention emphasizes again that the operation mode of the present invention mainly uses an interface object to provide a set of data library fetching functions, so that the programs that need to perform data fetching in the information system can be used by inheritance. Owns the database access function in the object). All the programs that need to access the database in the information system obtain the consistent database access methods by inheriting the object. These methods are used to access the database, and the code that actually obtains or releases the resources is uniformly distributed by Interface objects to control. Because the method of obtaining and releasing the connected object varies depending on the database used

第12頁 1245202 五、發明說明(9) 有所差異,因此,本發明使用另一個連線管理物件來負責 不同資料庫連線取得與釋放。而介面物件中連線取得與釋 放動作其實是去呼叫連線管理物件中相對應的功能,此一 架構在遇到系統需要更換資料庫時,只需更換連線管理物 件(或是修改連線管理物件中的程式碼)即可,對於整個資 訊系統中的其他程式,均不需要進行修正,如此即可達到 統籌控管、容易維護以及完全釋放系統資源的方法。此一 做法亦可在連線管理物件中加入連線集區(Connection Pool〉的功能,提昇資料庫存取的整理效率。Page 12 1245202 V. The description of the invention (9) is different. Therefore, the present invention uses another connection management object to take charge of the connection and release of different databases. The connection acquisition and release action in the interface object is actually to call the corresponding function in the connection management object. This architecture only needs to change the connection management object (or modify the connection) when the system needs to change the database. Manage the code in the object), and other programs in the entire information system do not need to be modified, so that you can achieve a method of overall control, easy maintenance, and complete release of system resources. This method can also add the function of a connection pool (Connection Pool) to the connection management object to improve the efficiency of data inventory collection.

雖然本發明已以較佳實施例揭露如上,然其並非用以 限定本發明,任何熟悉此項技藝者,在不脫離本發明之精 神和範圍内,當可做些許更動與潤飾,所作更動與潤飾仍 屬於本發明後附之申請專利範圍之内。Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. Anyone skilled in the art can make some modifications and retouches without departing from the spirit and scope of the present invention. Retouching is still within the scope of the patent application attached to the present invention.

第13頁 1245202 圖式簡單說明 第 一 圖 顯 示 本 發 明 方 法 的 流 程 圖 0 第 二 圖 顯 示 應 用 本 發 明 方 法 的 資 訊 系 統 示 意 圖 0 第 二 圖 顯 示 之 連 線 管 理 物 件 與 資 料 庫 存 取 介 面 物 件 的 架 構 關 係 圖 0 第 四 圖 係 依 據 第 三 圖 實 作 的 具 體 實 施 例 0 第 五 圖 顯 示 連 線 管 理 物 件 的 取 得 與 釋 放 連 線 物 件 的 具 體 實 施 例 0 第 六 圖 顯 示 資 料 庫 存 取 介 面 物 件 的 取 得 連 線 物 件 與 釋 放 資 訊 系 統 所 有 資 源 的 具 體 實 施 例 0 第 七 圖 顯 示 系 統 應 用 物 件 的 的 具 體 實 施 例 0 圖 號 編 號 說 明 10 方 法 20 網 站 伺 服 器 30 資 料 庫 40 用 戶 端 電 腦 50 連 線 管 理 物 件 60 資 料 庫 存 取 介 面 物 件 70 系 統 應 用 物 件 10 1 步 驟 103 步 驟 20 1 應 用 程 式Page 13124520 Brief description of the diagram The first diagram shows the flowchart of the method of the present invention 0 The second diagram shows the schematic diagram of the information system applying the method of the present invention Fig. 0 The fourth diagram is a specific embodiment implemented according to the third diagram. The fifth diagram shows a specific embodiment of obtaining and releasing the connection management object. The sixth diagram shows the obtaining interface of the data library access interface object. Object and specific embodiment of releasing all resources of the information system 0 The seventh figure shows the specific embodiment of the system application object 0 Figure No. Number Description 10 Method 20 Web Server 30 Database 40 Client Computer 50 Connect 60 resources management member was taken dielectric surface material inventory system was member 70 should step 103 to step 201 with application process 101 steps formula was member

第14頁Page 14

Claims (1)

1245202 六、申請專利範圍 1 · 一種用於資訊系統中取得與釋放資料庫存取資源的方 法,包括下列步驟: •提供一連線管理物件以及一資料庫存取介面物件, 其中該資料庫存取介面物件係能夠使用該連線管理物件中 所提供的連線取得與釋放功能,該資料庫存取介面物件係 用於處理指令物件(PreparedStatement)以及資料集合物 件(ResultSet)的取得與釋放,其中該資料庫存取介面物 件包含一組標準的資料庫存取功能,讓資訊系統中需要存 取資料庫的程式透過繼承的方式來使用;1245202 VI. Scope of Patent Application 1 · A method for obtaining and releasing data library and resource acquisition in information system, including the following steps: • Provide a connection management object and a data library access interface object, wherein the data library access interface object It can use the connection acquisition and release functions provided in the connection management object. The database access interface object is used to process the acquisition and release of the command object (PreparedStatement) and data collection object (ResultSet). The access interface object includes a set of standard database access functions, so that programs in the information system that need to access the database can use it by inheritance; •令執行於網站伺服器的應用程式利用繼承在該資料 庫存取介面物件中所有功能的方式,來對該資料庫進行存 取。 2.如申請專利範圍第1項所述之方法,其中該連線管理物 件,係依據不同資料庫的取得與釋放的不同而實作 (Implementation) 〇 3 .如申請專利範圍第1項所述之方法,其中該資料庫存取 介面物件,係不相依於資料庫的實作(Implementation)指 令0 4.如申請專利範圍第1項所述之方法,其中該資料庫,係 經由網路與該網站伺服器網路連接。• Make the application running on the web server access the database by inheriting all the functions in the database access interface object. 2. The method described in item 1 of the scope of patent application, wherein the connection management object is implemented according to the different acquisition and release of different databases. (3) As described in item 1 of the scope of patent application Method, wherein the data library takes interface objects, which are independent of the implementation instructions of the database 0 4. The method as described in item 1 of the scope of patent application, wherein the database is connected to the database via the network Web server network connection. 5 .如申請專利範圍第1項所述之方法,其中該網站伺服 器,係為一網頁伺服器(W e b S e r v e r )。 6 .如申請專利範圍第1項所述之方法,其中該網站伺服 器,係經由網路與至少一個以上的用戶端電腦連接。5. The method according to item 1 of the scope of patent application, wherein the web server is a web server (W e b Se r v e r). 6. The method according to item 1 of the scope of patent application, wherein the web server is connected to at least one client computer via a network. 第15頁 1245202 六、申請專利範圍 7 ·如申請專利範圍第1項所述之方法,其中該連線管理物 件,係至少包括一取得連線物件功能以及一釋放連線物件 功能。 8 ·如申請專利範圍第1項所述之方法,其中該料庫存取介 面物件,係至少包括一連線物件、一指令物件、一資料集 合物件以及一釋放連線物件功能和一釋放所有物件功能。Page 15 1245202 6. Scope of patent application 7 · The method described in item 1 of the scope of patent application, wherein the connection management object includes at least a function of obtaining a connection object and a function of releasing a connection object. 8 · The method as described in item 1 of the scope of the patent application, wherein the inventory inventory interface object includes at least a connection object, a command object, a data collection object, a release connection object function, and a release all object Features. IH· 第16頁IH · Page 16
TW093107274A 2004-03-18 2004-03-18 Method for obtaining and releasing database access resource in information system TWI245202B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW093107274A TWI245202B (en) 2004-03-18 2004-03-18 Method for obtaining and releasing database access resource in information system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW093107274A TWI245202B (en) 2004-03-18 2004-03-18 Method for obtaining and releasing database access resource in information system

Publications (2)

Publication Number Publication Date
TW200532492A TW200532492A (en) 2005-10-01
TWI245202B true TWI245202B (en) 2005-12-11

Family

ID=37190037

Family Applications (1)

Application Number Title Priority Date Filing Date
TW093107274A TWI245202B (en) 2004-03-18 2004-03-18 Method for obtaining and releasing database access resource in information system

Country Status (1)

Country Link
TW (1) TWI245202B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110179057A1 (en) * 2010-01-18 2011-07-21 Microsoft Corporation Database engine throttling
TWI699658B (en) * 2017-08-11 2020-07-21 鼎新電腦股份有限公司 Data sharing system and data sharing method

Also Published As

Publication number Publication date
TW200532492A (en) 2005-10-01

Similar Documents

Publication Publication Date Title
US8156137B2 (en) Data processing systems and methods
CN110806933B (en) Batch task processing method, device, equipment and storage medium
US8239389B2 (en) Persisting external index data in a database
CN102122289B (en) Dispatching conflicting data changes
US8751437B2 (en) Single persistence implementation of business objects
WO2019047441A1 (en) Communication optimization method and system
CN109933760A (en) List generation method, device, computer equipment and computer readable storage medium
US20070186176A1 (en) System and method for window tab organization
CN105630860A (en) Database system with transaction control block index
US20090319951A1 (en) Aggregating Service Components
US20070240166A1 (en) System and method of providing inter-application communications
WO2013119416A1 (en) A system to view and manipulate artifacts at a temporal reference point
US8880464B1 (en) Methods and apparatus for synchronizing closed heterogenous systems
US20080163083A1 (en) Tailored object
US9740994B2 (en) Simulation of supply chain plans using data model
WO2016127577A1 (en) Event processing method and apparatus
US11720607B2 (en) System for lightweight objects
US9207966B2 (en) Method and system for providing a high-availability application
US20090328043A1 (en) Infrastructure of data summarization including light programs and helper steps
CN101604286B (en) Method for generating keyword-driving table
JP2008165272A (en) Database update management system, program, and method
CN102929619A (en) Process automation software development system across hardware platform
US10776364B1 (en) Processing streaming data in a transaction-based distributed database system
CN107220275A (en) Database handles processing method, device and computer equipment
US20140173551A1 (en) Model augmentation in a model-driven application development environment

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees