s6 : message digest of added rows in MCDT are inserted to MCMDT and set the f value to 1
join DSMDT or MCMDT with the condition that the f value of DSMDT or MCMDT is 1, and select only the changed rows
D1 : only rows in MC are modified/delete
D2 : only rows in DS are modified/delete
s7 : Replace the row in DS with the row in MC / Delete the row from DS
s8 : Replace the row in MC with the row in DS / Delete the row from MC
s9 : -Delete corresponding rows from two MDT
Replace the rows in DS with the rows in MC
Delete the row from DS
Insert the row in MC to DS
-Both rows are modified/delete
-Apply the synchronization policy
s10 : Delete corresponding rows from two MDTs
Replace the rows in MC with the rows in DS
Delete the row from MC
Insert the row in DS to MC
s11 : Add the rows added to MCDT to DSDT
s12: Add the rows added to DSDT to MCDT
Message digest consists of a unidirectional hash functionthat maps a message of a random length to a fixedlength
hashvalue. Message digest h is created by the hash function H,which can be expressed as follows:h = H(M)M
is a message of a random length and H(M) is a fixedlengthmessage digest. Even a single bit changed in themessage
causes a change of message digest value [9]. Fig. 2demonstrates how this message digest mechanism can beapplied
to a relational database to examine data identitybetween rows of two tables.Data in two rows are identical if two
rows in Tables Aand B have identical message digest values. If the twovalues are different, it means that the two
rows have one ormore different column values. Accordingly, this method canbe useful in detecting inconsistency
between two rows.Once a row with an inconsistency is detected, the row iscopied using the primary key in the
direction ofsynchronization according to the synchronization policy.This synchronization algorithm identifies a
modified rowwithout relying on the database's internal functions, logs ormetadata to enable synchronization that is
independent ofthe database vender.
Rows Inconsistency
An inconsistency refers to a state in which the publisheddata in the server-side database and the subscribed data
inthe mobile database carry different values due to a changeat either side. The two databases add, delete and
modifydata independently, which makes inconsistency inevitable.TABLE I displays every case for an inconsistency
for asingle row.Among the 16 cases indicated in TABLE I, Cases 6, 7, 8,10 and 14 include the ADD operation,
which cannot occurfor a single row. For example, in Case 7 the row added atthe server side is different from the row
modified at theclient; therefore, it cannot be considered an inconsistency.Case 7 is equivalent to Case 3 and Case 5
SAMD does not consider the five cases