added database building java file and layout