Added database prefix as parameter