Added database build script
Adjusted test.php to be more generic