Fixed DatabaseScript to create the analysisjob first so that other
tables are able to reference it properly.