Objective: Over the last few decades, there has been significant interest in the automatic analysis of respiratory sounds. However, currently there are no publicly available large databases with which new algorithms can be evaluated and compared. Further developments in the field are dependent on the creation of such databases. Approach: This paper describes a public respiratory sound database, which was compiled for an international competition, the first scientific challenge of the IFMBE' s International Conference on Biomedical and Health Informatics. The database includes 920 recordings acquired from 126 participants and two sets of annotations. One set contains 6898 annotated respiratory cycles, some including crackles, wheezes, or a combination of both, and some with no adventitious respiratory sounds. In the other set, precise locations of 10 775 events of crackles and wheezes were annotated. Main results: The best system that participated in the challenge achieved an average score of 52.5% with the respiratory cycle annotations and an average score of 91.2% with the event annotations. Significance: The creation and public release of this database will be useful to the research community and could bring attention to the respiratory sound classification problem.