A new collection of photodissociation and photoionisation cross sections for 102 atoms and molecules of astrochemical interest has been assembled, along with a brief review of the basic physical processes involved. These have been used to calculate dissociation and ionisation rates, with uncertainties, in a standard ultraviolet interstellar radiation field (ISRF) and for other wavelength-dependent radiation fields, including cool stellar and solar radiation, Lyman-α dominated radiation, and a cosmic-ray induced ultraviolet flux. The new ISRF rates generally agree within 30% with our previous compilations, with a few notable exceptions. Comparison with other databases such as PHIDRATES is made. The reduction of rates in shielded regions was calculated as a function of dust, molecular and atomic hydrogen, atomic C, and self-shielding column densities. The relative importance of these shielding types depends on the atom or molecule in question and the assumed dust optical properties. All of the new data are publicly available from the Leiden photodissociation and ionisation database. Sensitivity of the calculated rates to variation of temperature and isotope, and uncertainties in measured or calculated cross sections, are tested and discussed. Tests were conducted on the new rates with an interstellar-cloud chemical model, and find general agreement (within a factor of two) in abundances obtained with the previous iteration of the Leiden database assuming an ISRF, and order-of-magnitude variations assuming various kinds of stellar radiation. The newly parameterised dust-shielding factors makes a factor-of-two difference to many atomic and molecular abundances relative to parameters currently in the UDfA and KIDA astrochemical reaction databases. The newly-calculated cosmic-ray induced photodissociation and ionisation rates differ from current standard values up to a factor of 5. Under high temperature and cosmic-ray-flux conditions the new rates alter the equilibrium abundances of abundant dark cloud abundances by up to a factor of two. The partial cross sections for H 2 O and NH 3 photodissociation forming OH, O, NH 2 and NH are also evaluated and lead to radiation-field-dependent branching ratios.