Creating the BAM Database