java scripts and mysql queries for imdb database