java sql ruby finals