implement initDatabase script