Merged createDB script with my changes