database update - write only chages; database cleanup; database header check