FAULT TOLERANT CHANGE DISTRIBUTION METHOD IN A DISTRIBUTED DATABASE SYSTEM

Abstract: The invention relates to a fault tolerant change distribution method in a distributed database system comprising at least two separate intercommunicating databases (SX1, SX2, MX1-MX6, RIH). At least part of the stored data is identical in the different databases. According to the invention, the changeable data items of the databases are provided with state fields, whereby, after a data item has been added, deleted or modified, the state field of said data item is set in a state which indicates that the change should be transmitted to another database. When the change has been transmitted to the other database, an acknowledgement of receipt of the change is awaited from the other database, whereafter the state field of the data item is set in a state which indicates that the change has been transmitted.

Description: Fault tolerant change distribution method in a distributed database system Field of the invention The present invention relates to a fault tolerant change distribution method in a distributed database system comprising at least two separate inter¬ communicating databases, at least part of the data stored therein having identical contents in the different databases. A distributed database system refers typically to a system with two or more separate intercommunic¬ ating databases. At least part of the stored data is identical in two or more databases. Therefore, when common data is changed in one of these databases, the same change must be made in all the other databases containing the same data in order that the required uniformity of the data would be maintained in the data¬ base system. Under normal circumstances, a database in which certain data has been changed first simply trans¬ mits the change to the other databases through inter¬ connecting links. Problems arise, however, when faults occurring either in the databases or in the inter¬ connecting links prevent the transmission of a change to all or part of the databases. Conventionally this problem has been solved by storing the changes in special buffers in the databases until they have been transmitted. This method has, however, serious drawbacks: 1) separate buffers may require a significant amount of additional memory capacity, 2 ) the updating of buffers requires extra computer resources, and 3) buffer overflows may occur. In case of a buffer overflow, some data is always lost, and thus the validity of the data suffers. Processes preventing overflows and processes used for recovering from overflows are complicated, and compromises must often be made in practical applications. Disclosure of the invention The object of the invention is to provide such a fault tolerant change distribution method for a distributed database system that solves the above- mentioned problems. This and other objects and advantages of the invention are achieved with a fault tolerant change distribution method of the type described in the intro¬ duction, which is characterized in that it comprises the steps of providing the changeable data items of the databases with state fields, after a data item has been added, deleted or modified, setting the state field of said data item in a state which indicates that the change should be trans- itted to another database, transmitting the change to the other database, waiting for an acknowledgement of receipt of the change from the other database, and after the acknowledgement has been received, setting the state field of the changed data item in a state which indicates that the change has been trans¬ mitted. The basic idea of the method of the invention is to add a state information field to each data item in a distributed database system instead of using separate buffers for storing changes. The state informa¬ tion field indicates how far the distribution of a data item/change has advanced in the distributed database system. According to the invention, the distribution of a data item/change is controlled by acknowledgement messages. The distribution/transmission is repeated periodically until it succeeds. The method of the present invention requires little additional memory, and there are no problems of overflow as it is the original file, where the data items merely have different states, that functions as a "buffer". In addition, the method renders it easy to withdraw such deletion of a data item even after the deletion has been effected, as the data item does not have to be deleted physically. Instead, a state informa¬ tion field is merely set to indicate that this data item has been deleted. This renders it even possible to delete logically interconnected data items in a con¬ trolled manner. According to an embodiment of the invention, the capacity of a very large database can be improved by using a compact transmission list for rapid finding of those data items whose transmission/distribution has not yet succeeded. The purpose of the transmission list is to render it unnecessary to go through large data¬ bases in order for such data items to be found. When transmission lists are employed, similar overflows may occur as in separate buffers, but in such cases the use of a transmission list can be easily prevented until it is operational again. When the transmission list is out of use, the data items to be transmitted are searched for directly from the database by examining the state information fields of the data items. Brief description of the drawings In the following, the invention will be described in greater detail by means of embodiments and with reference to the accompanying drawing, which is a schematic block diagram of a radio system comprising a distributed database to which the method of the inven¬ tion may be applied. Detailed description of the invention The invention can be applied to any distributed database, but in the following it will be described by way of example in connection with a mobile radio system. In the simplest configuration, a mobile radio network is a local network comprising only one mobile exchange MX (local exchange) and a base station system which is controlled by the mobile exchange and may have several base stations BS1-BS3 providing services for a plurality of mobile radios MS1-MS3. In the drawing, for example, each mobile exchange MS1-MX6 alone may establish a local network. A network configuration more extensive than that described above is a system network comprising a single system exchange SX and a plurality of local ex¬ changes MX1-MX6. The local exchanges MX are connected in a star configuration to the system exchange SX1-SX2 over fixed links 1, such as cables. The system exchange SX1-SX2 acts as a central node between the local ex¬ changes MX1-MX6. The system network is typically used when the capacity requirements exceed those satisfied by the local network. The system network is assumed to cover a single area where mobile radios roam and where the same services are required within the entire area. The extended network configuration in turn com¬ prises several system networks and local networks con- nected to a roaming information handler RIH. A typical example is a nationwide radio network. The RIH serves only as a subscriber location information database . The system exchanges SX are connected to the RIH over data links 2, and calls between the system exchanges are connected over other links 3. The registrations of the mobile radios MS enable the radio system to keep a record of the loca¬ tion of the mobile radio subscribers so that the calls to the mobile radio subscriber can be connected without that the calling party has to know where the subscriber is located. The subscriber location information is divided between the RIH, SX and MX. The location information stored in the RIH indicates in which system exchange (SX) the subscriber is located. The location information stored in the system exchange SX indicates in which local exchange MX the subscriber is located. Finally, the location information stored in the MX indicates in which registration area the subscriber is located. When the subscriber changes the registration area within the local exchange, only the registration- area information in the local exchange MX is updated. But when the sub¬ scriber roams to a registration area controlled by another local exchange MX, the location information of the system exchange SX is also updated and the previous local exchange MX is informed that the subscriber is no longer located within its area, as a result of which the MX removes the subscriber from its location register. The subscriber data are stored in a central database of the SX. When the mobile radio subscriber registers to the local exchange MX, the subscriber data are transferred from the database of the system exchange SX to the database of the local exchange MX. When the mobile radio removes the registration or roams to the area of another local exchange MX, the subscriber data are removed from the database of the previous local exchange MX. In a mobile radio system, the data stored in the databases are primarily subscriber data, and the changes concerning them may be, for example, addition/ deletion/modification of a subscriber, registration/ removal of registration of a subscriber to/from the MX, SX and RIH, etc. In the subscriber data contained in the databases, each data item can be identified, for example, by a subscriber identifier and the type of data. According to the invention, a state information field is associated with each changeable data item, for indicating how far the distribution of a change pertain- ing to this data item has advanced in a distributed database system. After a data item has been added, deleted or modified, the state field of said data item is set to a state which indicates that the change should be transmitted to another database. When the change has been transmitted to the other database, an acknowledge¬ ment of receipt of the change is awaited from the other database, and after the acknowledgement has been received, the state field of the changed data item is set in a state which indicates that the change has been transmitted. In addition, it is periodically checked whether the database contains data items whose change transmissions have not been acknowledged and whose transmission should be repeated. The change is trans¬ mitted time after time until an appropriate acknowledge- ment is received. In addition, each changed data item and trans¬ mitted change is provided with an age stamp which dis¬ closes the relative age of the change, whereby of two or more changes directed to the same data item, the one provided with the newest age stamp, i.e. the newest or latest change, is selected as being valid. Also, if the same data item is changed in the same database for several times so rapidly that all of the changes obtain the same age stamp, it must be ensured that it is the latest change that is transmitted forward. Such changes are distinguished by a modification identifier: different changes made to a certain data item in the same database always get individual identifiers if they have identical age stamps. Generally speaking, each change that changes the state of the state field of a data item is identified with a transaction type, an age stamp and a modification identifier. In order to find the data items containing changes to be transmitted, it is necessary to go through the file of the entire database, which may be laborious when very large databases are concerned. In such very large databases, the efficiency of the method of the invention can be improved by employing a compact trans¬ mission list of the data items comprising changes to be transmitted. Every time a data item is added, deleted or modified, the identifier of said data item is added to the transmission list, and when an acknowledgement pertaining to the transmitted data item is received, the identifier of the data item corresponding to the acknow- ledgement is deleted from the transmission list. In this manner it is sufficient to monitor a relatively short transmission list instead of having to go through the entire database. When a transmission list is employed, similar overflows may occur as when separate buffers are used, but in such cases the use of a transmission list can be easily prevented temporarily until it is opera¬ tional again. In a preferred embodiment of the inven¬ tion, the use of the transmission list is prevented in a case of overflow until no changes to be transmitted are found in said database. Meanwhile, all data items of the database are examined in order to find the changes to be transmitted, which is more laborious but also more secure. In the following, it is described by way of example and with reference to the drawing how the system exchange SX transmits a changed data item to a local exchange MX. When a change has been made to a data item, the SX checks the state of the data item and the type of the change, and transmits the data item to the MX. In addition, the SX writes the identifier of the sub¬ scriber whose data was changed to the transmission list of the SX, and increments a counter which indicates the number of the subscribers having changed data items which have been transmitted to the MX but not yet acknowledged. In this case, the transmission list is even more compact, as a single subscriber identifier can indicate all data items provided with said subscriber identifier in a database. At certain intervals the SX checks the counter of the transmission list so as to find out whether there are changes on the list that have not yet been acknowledged. If such changes exist, it picks the subscriber number from the transmission list, searches for all such changes relating to this sub¬ scriber, and transmits this data to the correct MX. If overflow occurs in the transmission list, the counter is used to keep track of the number of the subscribers, and the data is read directly from the files of the database. The transmission list is not used again until there is nothing left in the database to be transmitted to the MX. The transmission of a certain changed data item to the MX is discontinued either if the SX receives an acknowledgement from the MX or if the SX observes that a newer change has been made in the MX, said newer change revoking the older change made in the SX. Then the SX sets the state of this data item to indicate that there is no need to send said change to the MX. If it is no longer necessary to transmit the data items relating to a certain subscriber identifier, it is removed from the transmission list, and the counter is decremented by one. The drawing and the associated description are merely intended to illustrate the present invention. In its details, the method of the invention can be modified within the scope of the appended claims.

Claims: Claims : 1. A fault tolerant change distribution method in a distributed database system comprising at least two separate intercommunicating databases, at least part of the data stored therein having identical contents in the different databases, c h a r a c t e r i z e d in that it comprises the steps of providing the changeable data items of the databases with state fields, after a data item has been added, deleted or modified, setting the state field of said data item in a state which indicates that the change should be trans¬ mitted to another database, transmitting the change to the other database, waiting for an acknowledgement of receipt of the change from the other database, and after the acknowledgement has been received, setting the state field of the changed data item in a state which indicates that the change has been trans¬ mitted. 2. A method according to claim 1, c h a r ¬ a c t e r i z e d in that the transmission of the change is repeated until an appropriate acknowledge- ment is received. 3. A method according to claim 1 or 2, c h a r a c t e r i z e d in that each changed data item and transmitted change is provided with an age stamp which discloses the relative age of the change, whereby of two or more changes directed to the same data item, the one provided with the latest age stamp is selected as being valid. 4. A method according to claim 1, 2 or 3, c h a r a c t e r i z e d in that the transmission of a change is discontinued if it is observed that a newer change has been made to the database which is the target of the transmission, said new change revoking the change that is transmitted, whereafter the state field of the data item is set to a state which indicates that there is no need to transmit the change. 5. A method according to any one of the pre¬ ceding claims, c h a r a c t e r i z e d in that the databases contain subscriber data of a data communica¬ tions system, each data item being identified with a subscriber identifier and the tj *e of data, and that each change that changes the state of the state field of a data item is identified with a transaction type, an age stamp and a modification identifier, which dis¬ tinguishes different modifications with the same age stamp. 6. A method according to any one of the pre¬ ceding claims, c h a r a c t e r i z e d in that it further comprises maintaining a transmission list of the data items or subscriber identifiers containing changes to be transmitted, and checking at regular intervals by means of the transmission list whether there are changes which have been transmitted but have not been acknowledged and which should be retransmitted. 7. A method according to claim 6, c h a r ¬ a c t e r i z e d in that after addition, deletion or modification of a data item, the identifier of said data item is added to the transmission list, after receipt of an acknowledgement from the database which is the target of the transmission, the identifier of the corresponding data item is removed from the transmission list. 8. A method according to claim 6, c h a r ¬ a c t e r i z e d in that a new subscriber identifier is added to the transmission list as a result of a first change of the data item relating to said subscriber identifier, the subscriber identifier is removed from the transmission list when there are no more unacknowledged changes relating to said subscriber identifier. 9. A method according to claim 6, 7 or 8, c h a r a c t e r i z e d in that a counter reading is maintained of the number of data items or subscriber identifiers on the transmission list.

Inventors: PENTIKAEINEN JUKKA, TUULOS MATTI, PENTIKAEINEN, JUKKA, TUULOS, MATTI
Applicants: NOKIA TELECOMMUNICATIONS OY, PENTIKAEINEN JUKKA, TUULOS MATTI
Application year: 1993
Main classification: G06F15
IPC codes: G06F11, G06F12, G06F17, H04W8, H04W24