Builds and execute a SELECT command with the given parameters, and returns a TableModel with all related rows.