To better understand the effect of geometry and attribute distortion on the subjective quality of point clouds, we built a database with subjective quality scores for compressed point clouds. We analyzed the impact of geometry and attribute distortion to subjective quality. Our database, named the NWPU Point Cloud Quality Database (NWPU-PCQD), contains 817 point clouds with various geometry and attribute quantification distortions, which were subjectively evaluated using head-mounted displays (HMDs). Through correlation and significance analysis of the subjective quality scores, we observe that geometry and attribute quantization do not equally contribute to the overall subjective quality, where the effect of geometry quantization dominates. Moreover, there is an interaction between the geometry and attribute distortion. Our subjective database and findings are useful for point cloud processing, transmission, and compression.