Data management in astronomy and earth sciences: similarities and differences