TWI409652B - Simulate the system log data synchronization system - Google Patents
Simulate the system log data synchronization system Download PDFInfo
- Publication number
- TWI409652B TWI409652B TW99143932A TW99143932A TWI409652B TW I409652 B TWI409652 B TW I409652B TW 99143932 A TW99143932 A TW 99143932A TW 99143932 A TW99143932 A TW 99143932A TW I409652 B TWI409652 B TW I409652B
- Authority
- TW
- Taiwan
- Prior art keywords
- electronic device
- data
- system log
- data table
- field
- Prior art date
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
一種資料同步系統,特別是指一種模擬系統日誌以同步資料庫之資料同步系統。A data synchronization system, in particular, a data synchronization system that simulates a system log to synchronize a database.
資料庫(database),簡單來說,其為具有不變性資料(persistent data)之資料彙集的地方。由於使用資料庫來儲存及處理資料,具有避免資料不一致、資料可以共享、提供異動管理、可建立資料標準、確保資料安全標準。A database, in simple terms, is a collection of materials with persistent data. Due to the use of the database to store and process data, it is possible to avoid data inconsistency, share data, provide transaction management, establish data standards, and ensure data security standards.
由於資料庫具有上述優點,因此,大部份的企業或政府因其組織龐大,業務日趨複雜,為了有效管理及執行各業務,通常會把人事資料,表單資料、收支管理、庫存資訊、書籍、會計系統、卷案內容...等各種資訊儲存於資料庫內,再藉由資料庫管理系統,來控制資料的分類及存取。Due to the above advantages of the database, most enterprises or governments are complicated by their organizations, and their business is increasingly complicated. In order to effectively manage and execute various businesses, personnel information, form materials, revenue and expenditure management, inventory information, and books are usually used. Various information such as accounting system, volume content, etc. are stored in the database, and the database management system is used to control the classification and access of the data.
而當資料儲存於各分散式之資料庫時,為使各資料庫能隨時維持在最新狀態,通常會藉由執行資料庫同步的程序,以完成資料庫之間相互同步(synchronize)。When the data is stored in each decentralized database, in order to keep the databases up to date, the database synchronization process is usually performed to synchronize the databases.
於習知技術中,若欲使各資料庫之間相互同步,通常需取得原資料庫之系統日誌,以得知原始系統所存之資料,資料變動時間,資料變動內容...等相關參數資訊,再藉由執行重做(Redo)程序,以將各資料庫之間的資料相互同步。然而,由於系統日誌,需系統廠商提供而不開放,因此,若兩資料庫是由不同廠商開發建構,若無法取得系統日誌,系統維護人員便無法使其相同步,而使得資料庫之應用大大受到限制。In the prior art, if each database is to be synchronized with each other, it is usually necessary to obtain a system log of the original database to know the information stored in the original system, the time of the data change, the content of the data change, and the like. Then, by executing the Redo program, the data between the databases is synchronized with each other. However, because the system log needs to be provided by the system vendor and is not open, if the two databases are developed and constructed by different vendors, if the system log cannot be obtained, the system maintenance personnel cannot synchronize them, and the application of the database is greatly restricted.
本發明之主要目的,旨在提供一種可藉由模擬系統日誌以達資料同步之系統,而使各資料庫之間可相互同步,藉以擴展其應用性。The main object of the present invention is to provide a system that can synchronize data by simulating system logs, so that each database can be synchronized with each other, thereby expanding its applicability.
為達上述目的,本發明模擬系統日誌之資料同步系統,其係包含一第一電子裝置及一第二電子裝置。該第一電子裝置具有一第一處理單元及一第二處理單元。該第一記憶單元係儲存一第一資料表格及一資料同步程式。該資料同步程式包括一系統日誌模擬程序及一系統日誌還原程序。該第二電子裝置具有一第二處理單元及一第二記憶單元。該第二記憶單元係儲存一第二資料表格。其中,當該第一資料表格之記錄內容更新變動後,該第一處理單元係藉由執行該系統日誌模擬程序,以模擬出一系統日誌,當該第一電子裝置通訊連接該第二電子裝置時,則該第一處理單元係執行該系統日誌還原程序,以還原出該系統日誌,使該第二電子裝置根據該系統日誌之記錄,將該第二資料表格與該第一資料表格相同步。To achieve the above objective, the present invention simulates a system log data synchronization system, which includes a first electronic device and a second electronic device. The first electronic device has a first processing unit and a second processing unit. The first memory unit stores a first data table and a data synchronization program. The data synchronization program includes a system log simulation program and a system log restore program. The second electronic device has a second processing unit and a second memory unit. The second memory unit stores a second data form. After the update of the recorded content of the first data table, the first processing unit simulates a system log by executing the system log simulation program, and when the first electronic device is communicatively connected to the second electronic device The first processing unit executes the system log restore program to restore the system log, so that the second electronic device synchronizes the second data table with the first data table according to the record of the system log. .
其中,該系統日誌模擬程序包含下列步驟:Among them, the system log simulator includes the following steps:
以觸發(trigger)方式執行一插入(insert)指令、一更新(update)指令或一刪除(delete)指令,由該第一資料表格產生或變更一第一影子資料表格;及以觸發方式執行一插入(insert)指令,由該第一影子資料表格產生或變更一第一共用序列資料表格。Performing an insert instruction, an update instruction, or a delete instruction in a trigger manner, generating or changing a first shadow data table from the first data table; and executing a trigger mode An insert command is used to generate or change a first shared sequence data table from the first shadow data table.
其中,該第一影子資料表格包含一資料變更前欄位及一資料變更後欄位。The first shadow data table includes a data change field and a data change field.
其中,該第一共用序列資料表格包括一共用序列號欄位、一影子表格名稱欄位及一資料變動時間欄位。The first shared sequence data table includes a shared serial number field, a shadow form name field, and a data change time field.
其中,該系統日誌還原程序包含下列步驟:執行一選擇(select),以從該第一共用序列資料表格中,選擇出複數筆相對應之共用序列號欄位及複數筆影子表格名稱欄位;及執行一選擇指令,以從該等共用序列號欄位及該等影子表格名稱欄位中,選擇出相對應之該資料變更前欄位、該資料變更後欄位及該資料變動時間欄位。The system log restore program includes the following steps: performing a selection (select) to select a common serial number field and a plurality of shadow table name fields corresponding to the plurality of pens from the first shared sequence data table; And executing a selection instruction to select a corresponding pre-change field, a post-change field, and a data change time field from the shared serial number field and the shadow form name field .
其中,該第二處理單元接收到該系統日誌後,執行一重做(redo)程序,使該第二資料表格與該第一資料表格相同步。After receiving the system log, the second processing unit executes a redo process to synchronize the second data table with the first data table.
其中,該第一電子裝置係為一可攜式電子裝置、該第二電子裝置係為一伺服器。The first electronic device is a portable electronic device, and the second electronic device is a server.
其中,該第一電子裝置係為一可攜式電子裝置、該第二電子裝置係為一可攜式電子裝置。The first electronic device is a portable electronic device, and the second electronic device is a portable electronic device.
其中,該第一電子裝置係為一伺服器,該第二電子裝置係為一伺服器。The first electronic device is a server, and the second electronic device is a server.
其中,該第一電子裝置更具有一輸入單元,該輸入單元係供更新變動該第一資料表格之記錄內容。The first electronic device further has an input unit for updating and changing the recorded content of the first data table.
為使 貴審查委員能清楚了解本發明之內容,謹以下列說明搭配圖式,敬請參閱。In order for your review board to have a clear understanding of the contents of the present invention, please refer to the following description for matching drawings.
請參閱第1圖、第2圖、第3圖及第4圖所示,其係為本發明模擬系統日誌之資料同步系統之方塊圖、系統日誌模擬程序示意圖、系統日誌模擬程序流程圖及系統日誌還原程序流程圖。圖中,該資料同步系統包含一第一電子裝置1及一第二電子裝置2。Please refer to FIG. 1 , FIG. 2 , FIG. 3 and FIG. 4 , which are block diagrams of the data synchronization system of the simulation system log of the present invention, a schematic diagram of the system log simulation program, a system log simulation program flow chart and a system. Log restore program flow chart. In the figure, the data synchronization system comprises a first electronic device 1 and a second electronic device 2.
該第一電子裝置1具有一第一處理單元11、一第一記憶單元12及一輸入單元13。在本實施例中,該第一電子裝置1可為一可攜式電子裝置或一伺服器。The first electronic device 1 has a first processing unit 11, a first memory unit 12 and an input unit 13. In this embodiment, the first electronic device 1 can be a portable electronic device or a server.
該第一處理單元11可為一微處理器、一系統單晶片或是一微控制器,但不以此為限。The first processing unit 11 can be a microprocessor, a system single chip or a microcontroller, but is not limited thereto.
該第一記憶單元12則可為一動態存取記憶體、一快閃記憶體或一硬碟,但不以此為限。該第一記憶單元12係儲存一第一資料表格121及一資料同步程式122。該資料同步程式122則包括一系統日誌模擬程序1221及一系統日誌還原程序1222。The first memory unit 12 can be a dynamic access memory, a flash memory or a hard disk, but is not limited thereto. The first memory unit 12 stores a first data table 121 and a data synchronization program 122. The data synchronization program 122 includes a system log simulation program 1221 and a system log restore program 1222.
該輸入單元13可為一鍵盤、一滑鼠、一觸控式輸入元件或一雷射虛擬鍵盤,但不以此為限。The input unit 13 can be a keyboard, a mouse, a touch input component or a laser virtual keyboard, but is not limited thereto.
該第二電子裝置2則具有一第二處理單元21及一第二記憶單元22。The second electronic device 2 has a second processing unit 21 and a second memory unit 22.
該第二處理單元21可為一微處理器、一系統單晶片或一微控制器,但不以此為限。The second processing unit 21 can be a microprocessor, a system single chip or a microcontroller, but is not limited thereto.
該第二記憶單元22可為一動態存取記憶體、一快閃記憶體或一硬碟,但不以此為限。其中該第二記憶單元22係儲存一第二資料表格221及一重做(redo)程序222。The second memory unit 22 can be a dynamic access memory, a flash memory or a hard disk, but is not limited thereto. The second memory unit 22 stores a second data table 221 and a redo program 222.
其中,該第二電子裝置2可為一可攜式電子裝置或為一伺服器。The second electronic device 2 can be a portable electronic device or a server.
舉例而言,當該第一電子裝置1為可攜式電子裝置,如個人隨身助理或智慧型手機時,若使用者,如收費員,利用該第一電子裝裝置1登記車牌號碼,則藉由該輸入單元13將車牌號碼、登記時間等資料輸入至該第一電子裝置1內,而變動該第一資料表格121內之記錄內容。For example, when the first electronic device 1 is a portable electronic device, such as a personal portable assistant or a smart phone, if a user, such as a toll collector, uses the first electronic device 1 to register the license plate number, the borrowing is performed. The input unit 13 inputs the license plate number, the registration time, and the like into the first electronic device 1, and changes the recorded content in the first data table 121.
當該第一資料表格121記錄內容變動的同時,則該系統日誌模擬程序1221則以觸發(trigger)的方式執行一插入(insert)指令、一更新(update)指令或一刪除(delete)指令,由該第一資料表格121產生或變更一第一影子資料表格1223(步驟S11)。接著,以觸發(trigger)之方式,執行一插入(insert)指令,由該第一影子資料表格1223產生或變更一第一共用序列資料表格1224(步驟S12)。藉此,而可模擬出一系統日誌1220,以供後續還原同步所使用。When the first data table 121 records the content change, the system log simulation program 1221 performs an insert command, an update command, or a delete command in a trigger manner. A first shadow material table 1223 is generated or changed by the first data table 121 (step S11). Next, an insert command is executed in the manner of a trigger, and a first shared sequence data table 1224 is generated or changed by the first shadow data table 1223 (step S12). In this way, a system log 1220 can be simulated for subsequent restoration synchronization.
其中,該第一影子資料表格1223包含一資料變更前欄位1225及一資料變更後欄位1226,該第一共用序列資料表格1224包括一共用序列號欄位1227、一影子表格名稱欄位1228及一資料變動時間欄位1229。The first shadow data table 1223 includes a data change field 1225 and a data change field 1226. The first share sequence data table 1224 includes a shared serial number field 1227 and a shadow form name field 1228. And a data change time field 1229.
當該第一電子裝置1與該第二電子裝置2進行一通訊連接時,則該第一處理單元11執行該系統日誌還原程序1222。其中,該系統日誌還原程序1222執行一選擇(select)指令,從該第一共用序列資料表格1224中,選擇出複數筆相對應之共用序列號欄位1227及複數筆影子表格名稱欄位1228(步驟S21)。接著,該系統日誌還原程序1222執行一選擇(select)指令,以從該等共用序列號欄位1227及該等影子表格名稱欄位1228中,選擇出相對應之該資料變更前欄位1225、該資料變更後欄位1226及該資料變動時間欄位1229(步驟S22)。藉此,以還原出該系統日誌1220。When the first electronic device 1 performs a communication connection with the second electronic device 2, the first processing unit 11 executes the system log restore program 1222. The system log restore program 1222 executes a select command, and selects a common serial number field 1227 and a plurality of shadow table name fields 1228 from the first shared sequence data table 1224 ( Step S21). Next, the system log restore program 1222 executes a select command to select the corresponding data change field 1225 from the shared serial number field 1227 and the shadow form name field 1228. The data change field 1226 and the data change time field 1229 (step S22). Thereby, the system log 1220 is restored.
在此一併說明,該選擇(select)指令,係指一美國國家標準協會結構化查詢語言之標準指令,其係指執行一次選擇指令,然後以迴圈方式提取結果集合。舉例而言,假設結果集合內有n筆記錄,則該迴圈進行n次之提取動作。Herein, the selection instruction refers to a standard instruction of the American National Standards Institute structured query language, which refers to executing a selection instruction and then extracting the result set in a loop manner. For example, if there are n records in the result set, then the loop performs n extraction operations.
當該系統日誌1220還原出來後,則傳送至該第二電子裝置2後,該第二處理單元21收到該系統日誌1220後,則執行一重做(redo)程序222,使該第二資料表格221與該第一資料表格121相同步。After the system log 1220 is restored, after being transmitted to the second electronic device 2, after receiving the system log 1220, the second processing unit 21 executes a redo program 222 to make the second data. The table 221 is synchronized with the first data table 121.
其中,該第一電子裝置1與該第二電子裝置2同步的方式,可以有線網路傳輸連接、無線網路傳輸連接、無線藍芽傳輸、紅外線傳輸連接或USB連線等方式來實施,但不以此為限。The manner in which the first electronic device 1 and the second electronic device 2 are synchronized may be implemented by a wired network transmission connection, a wireless network transmission connection, a wireless Bluetooth transmission, an infrared transmission connection, or a USB connection, but Not limited to this.
綜上所述,由於本發明模擬系統日誌之資料同步系統,只要資料庫為串列(serial)資料形態之關連式資料庫,並取得創建表格(create table)、創建觸發程序(create trigger)權限,即可藉由模擬及還原系統日誌的方式,而可套用資料庫本身具有之重做(redo)程序,將兩種不同形態之資料庫予以同步化,大幅簡化系統建置成本及管理程序,及提昇相容性,以擴展資料庫應用範圍。In summary, due to the data synchronization system of the simulation system log of the present invention, as long as the database is a relational database of serial data forms, and the creation table (create table) and the creation trigger (create trigger) permission are obtained. By simulating and restoring the system log, the redo program (redo) can be applied to the database, and the database of two different forms can be synchronized, which greatly simplifies the system construction cost and management program. And improve compatibility to extend the scope of database applications.
唯,以上所述者,僅為本發明之較佳實施例而已,並非用以限定本發明實施之範圍,在不脫離本發明之精神與範圍下所作之均等變化與修飾,皆應涵蓋於本發明之專利範圍內。The above is only the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and the equivalent changes and modifications may be included in the present invention without departing from the spirit and scope of the invention. Within the scope of the invention patent.
綜上所述,本發明之模擬系統日誌之資料同步系統,係具有專利之發明性,及對產業的利用價值;申請人爰依專利法之規定,向 鈞局提起發明專利之申請。In summary, the data synchronization system of the simulation system log of the present invention has the patented invention and the use value of the industry; the applicant filed an application for an invention patent to the bureau according to the provisions of the patent law.
1...第一電子裝置1. . . First electronic device
11...第一處理單元11. . . First processing unit
12...第一記憶單元12. . . First memory unit
121...第一資料表格121. . . First data form
122...資料同步程式122. . . Data synchronization program
1220...系統日誌1220. . . System log
1221...系統日誌模擬程序1221. . . System log simulator
1222...系統日誌還原程序1222. . . System log restore program
1223...第一影子資料表格1223. . . First shadow data form
1224...第一共用序列資料表格1224. . . First shared sequence data form
1225...資料變更前欄位1225. . . Pre-change field
1226...資料變更後欄位1226. . . Field after data change
1227...共用序列號欄位1227. . . Shared serial number field
1228...影子表格名稱欄位1228. . . Shadow table name field
1229...資料變動時間欄位1229. . . Data change time field
13...輸入單元13. . . Input unit
2...第二電子裝置2. . . Second electronic device
21...第二處理單元twenty one. . . Second processing unit
22...第二記憶單元twenty two. . . Second memory unit
221...第二資料表格221. . . Second data form
222...重做程序222. . . Redo program
S11~S12...步驟流程S11~S12. . . Step flow
S21~S22...步驟流程S21~S22. . . Step flow
第1圖,為本發明模擬系統日誌之資料同步系統之方塊圖。Figure 1 is a block diagram of a data synchronization system for simulating system logs of the present invention.
第2圖,為本發明模擬系統日誌之資料同步系統較佳實施例之系統日誌模擬程序模擬系統日誌之示意圖。2 is a schematic diagram of a system log simulation program simulation system log of a preferred embodiment of a data synchronization system for simulating system logs according to the present invention.
第3圖,為本發明模擬系統日誌之資料同步系統較佳實施例之系統日誌模擬程序流程圖。3 is a flow chart of a system log simulation program of a preferred embodiment of a data synchronization system for simulating system logs according to the present invention.
第4圖,為本發明模擬系統日誌之資料同步系統較佳實施例之系統日誌還原程序流程圖。4 is a flow chart of a system log restore procedure of a preferred embodiment of a data synchronization system for simulating system logs according to the present invention.
1...第一電子裝置1. . . First electronic device
11...第一處理單元11. . . First processing unit
12...第一記憶單元12. . . First memory unit
121...第一資料表格121. . . First data form
122...資料同步程式122. . . Data synchronization program
1220...系統日誌1220. . . System log
1221...系統日誌模擬程序1221. . . System log simulator
1222...系統日誌還原程序1222. . . System log restore program
1223...第一影子資料表格1223. . . First shadow data form
1224...第一共用序列資料表格1224. . . First shared sequence data form
2...第二電子裝置2. . . Second electronic device
21...第二處理單元twenty one. . . Second processing unit
22...第二記憶單元twenty two. . . Second memory unit
221...第二資料表格221. . . Second data form
222...重做程序222. . . Redo program
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW99143932A TWI409652B (en) | 2010-12-15 | 2010-12-15 | Simulate the system log data synchronization system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW99143932A TWI409652B (en) | 2010-12-15 | 2010-12-15 | Simulate the system log data synchronization system |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201224804A TW201224804A (en) | 2012-06-16 |
TWI409652B true TWI409652B (en) | 2013-09-21 |
Family
ID=46725964
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW99143932A TWI409652B (en) | 2010-12-15 | 2010-12-15 | Simulate the system log data synchronization system |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI409652B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6466951B1 (en) * | 1999-02-10 | 2002-10-15 | Telefonaktiebolaget Lm Ericsson (Publ) | Data base synchronizing system with at least two host databases and a remote database |
TW200428237A (en) * | 2003-06-06 | 2004-12-16 | Hon Hai Prec Ind Co Ltd | System and method of scheduling and naming for database backup and recovery |
TW201019144A (en) * | 2008-11-06 | 2010-05-16 | Acer Inc | Remote computer synchronous transmission technology |
-
2010
- 2010-12-15 TW TW99143932A patent/TWI409652B/en active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6466951B1 (en) * | 1999-02-10 | 2002-10-15 | Telefonaktiebolaget Lm Ericsson (Publ) | Data base synchronizing system with at least two host databases and a remote database |
TW200428237A (en) * | 2003-06-06 | 2004-12-16 | Hon Hai Prec Ind Co Ltd | System and method of scheduling and naming for database backup and recovery |
TW201019144A (en) * | 2008-11-06 | 2010-05-16 | Acer Inc | Remote computer synchronous transmission technology |
Also Published As
Publication number | Publication date |
---|---|
TW201224804A (en) | 2012-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108280365B (en) | Data access authority management method, device, terminal device and storage medium | |
CN102737020B (en) | Method for initializing multi-tenant database, and apparatus thereof | |
US10339038B1 (en) | Method and system for generating production data pattern driven test data | |
US7822710B1 (en) | System and method for data collection | |
CN109997126A (en) | Event-driven is extracted, transformation, loads (ETL) processing | |
US9679037B2 (en) | System and method for implementing database replication configurations using replication modeling and transformation | |
CN103455589B (en) | Product data moving method under product factory mode, Apparatus and system | |
US11347492B2 (en) | Software deployment control using blockchain | |
Leno et al. | Automated discovery of data transformations for robotic process automation | |
CN106663103A (en) | Scalable eventual consistency system using logical document journaling | |
US10733057B2 (en) | Techniques for application undo and redo using SQL patchsets or changesets | |
US8880464B1 (en) | Methods and apparatus for synchronizing closed heterogenous systems | |
Strauch et al. | Migrating Application Data to the Cloud using Cloud Data Patterns. | |
CN107562931A (en) | Data pick-up system and data abstracting method | |
CN105677346A (en) | Dynamic expansion method of web interface and server | |
CN104021219A (en) | Method and device for generating data template | |
CN105975258A (en) | Data dictionary management method and system | |
CN110457333A (en) | Data real time updating method, device and computer readable storage medium | |
CN109522332A (en) | Customer profile data merging method, device, equipment and readable storage medium storing program for executing | |
CN104317957A (en) | Open platform and system for processing reports and report processing method | |
CN108573015A (en) | Change tabular method, apparatus, electronic equipment and readable storage medium storing program for executing | |
CN111783141B (en) | Data storage method, device and equipment based on block chain and storage medium | |
CN106897389A (en) | Generate the device and method of report | |
CN109857806B (en) | Synchronous verification method and device for database table | |
Masood-Al-Farooq | SQL Server 2014 Development Essentials |