Starting from a database containing thousands of items, the goal is to perform steps of selection/comparing/filtering depending on some mathematical conditions, in order to generate a small list of items (about 10). Let's call it final list.
This final list of items will contain, among other things, a Flickr code (from which is obtained its respective image, through Flickr API) Then, these 10 items from the final list plus their respective images must be shown in Google Forms, Mailchimp or any other online form.
The process above described can be developed in any programming language (preferable php). It is also needed to integrate an offline system written in Java with the database because its result will be used in the selection/filtering steps.
Finally, we also need some hints/tips about how to save a Java output (desktop) into the PostgreSQL (online).