Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

127
Visualizações
Synchronization of existing result set with database

I have a server program that works with database and N clients that are connected to server. In database I have a table of persons with about 10 000 persons. Now on X client the following sql query is executed:

SELECT * FROM persons WHERE age >18 AND sex=1 ORDER BY age.

And ordered list of 2500 persons is shown to X client. If there are changes on server side then list of persons shown to X client must be updated in most effective way.

Now on server side person with id =120 was updated by some client. After this update we don't know his age and sex. So there are two situations:

  1. His age >18 AND SEX=1 and he must be present in X client selected persons
  2. His age <=18 OR SEX=2 and he mustn't be present in X client selected persons.

So what is the most effective way to find now out - if person with id=120 is in X selected persons or isn't? Is this person is, then what is its position? I consider here the easiest case, but what if there are three of five updates? What to do this case?

I think that there are solutions for such synchronization of existing result set with database if data change but I can't find necessary words to find it in internet. Please, any hints any solution/algorithm names.

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda