This dataset contains an AiiDA database and essential data for reproducing the main results in our manuscript. 1) 2D_database.aiida This Aiida database has new phonon dispersions of all 245 two-dimensional materials produced in this work by applying our general invariance conditions. 2) code.zip Fortran90 source files of q2r and matdyn code in Quantum ESPRESSO (QE) distribution (only those modifiled by us are provided), which have implemented our methods of invariance conditions presented in the manuscript. They were developed based on QE-6.8 and make sure you are using the correct version if you want to use these codes. To compile, please copy these source files into the PHonon directory of QE, i.e. 'qe-6.8/PHonon/PH'. 3) data.zip In this zip, there are three folders: force_constants_phonon_dispersions, pseudopotentials and structures. - force_constants_phonon_dispersions: Force constants calculated either by real-space (phonopy format) or reciprocal-space (q2r format) method for all materials studied in this work as well as the corresponding phonon dispersion data used in plotting figures of our manuscript. - pseudopotentials: All pseudopotentials used in this study. They come from v1.1 SSSP efficiency pseudopotentials’ library. - structures: Fully relaxed structures for 5 materials stuided in our work, silicon, triclinic CaP_3, graphene, 2D MoS_2 and single-wall (8,0) carbon nanotube. They are provided in pwscf input file format.