Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

122
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda