A method in a server computer for updating an electronic client device from said server computer, said server computer containing a first database with a plurality of database records and a log of database operations performed by said server computer, and said electronic client device containing a partial representation of said first database including database records accepted at said client device, the method comprising: scanning said log of database operations in order to identify a first record that has been inserted into, deleted from or changed in said first database or has had its acceptance at said client device changed by a declared acceptance rule subsequent to a previous update of said client device; identifying a second record which has not been added to, deleted from or changed in said first database, nor had its acceptance at said client device changed by any declared acceptance rule subsequent to said previous update, said second record being related to said first record through a foreign key constraint which requires that a key in one of said first and second record references a key in the other of said first and second record; transmitting first data from said server computer to said client device, said first data representing an instruction to said client device to perform an associated insert into, deletion from or change of said first record in said partial representation of said first database, or, if the acceptance for the record has changed, perform an insert into said partial representation of said first database if the record is now accepted and a deletion from said partial representation of said first database if the record is no longer accepted; and transmitting second data from said server computer to said client device, said second data representing an instruction to said client device to insert said second record into or delete said second record from said partial representation of said first database such that said foreign key constraint is fulfilled in said partial representation of said first database. scanning said log of database operations in order to identify a first record that has been inserted into, deleted from or changed in said first database or has had its acceptance at said client device changed by a declared acceptance rule subsequent to a previous update of said client device; identifying a second record which has not been added to, deleted from or changed in said first database, nor had its acceptance at said client device changed by any declared acceptance rule subsequent to said previous update, said second record being related to said first record through a foreign key constraint which requires that a key in one of said first and second record references a key in the other of said first and second record; transmitting first data from said server computer to said client device, said first data representing an instruction to said client device to perform an associated insert into, deletion from or change of said first record in said partial representation of said first database, or, if the acceptance for the record has changed, perform an insert into said partial representation of said first database if the record is now accepted and a deletion from said partial representation of said first database if the record is no longer accepted; and transmitting second data from said server computer to said client device, said second data representing an instruction to said client device to insert said second record into or delete said second record from said partial representation of said first database such that said foreign key constraint is fulfilled in said partial representation of said first database.