Legal and ethical issues in data sharing