Pregunta de entrevista de Yandex

How to pick appropriate database for the given task?