Hooligans Sportsbook

Mysql Front Ends

  • Start date
  • Replies
    31 Replies •
  • Views 2,701 Views

MrX

never had an intact pistachio club
Since
Jan 27, 2010
Messages
6,388
Score
459
Tokens
0
Does anyone here that's tried several of the mysql GUIs care to make a recommendation? In the past I just use the command line when I've needed to do something manually, but I have the need to do a bunch of pretty messy queries all of the sudden and I figure a good GUI will save some headaches.

I'm playing around with HeidiSQL and it seems adequate. I let my NaviCat trial expire without ever using it. I appreciate any input.
 
You are far better off with the command line, Mr. X. How messy can it be?

A lot of this kind of crap:

Code:
create table pitcher_games as
select pitch_id as pitcher,events.game_id,substring(events.game_id,4,8) as date,
events.fielding_team as team,bat_team as opp,pitch_hand as hand,
sum(batter_event='T') as pa,sum(event_type=3) as k,
sum(event_type=14) as unint_bb,sum(event_type=15) as int_bb,
sum(event_type=16) as hbp,sum(event_type=23) as hr,
sum(event_type=20) as b1,sum(event_type=21) as b2,sum(event_type=22) as b3,
sum(event_type=4) as sb,sum(event_type=5) as def_ind,
sum(event_type=6) as cs,sum(event_type=8) as po,sum(event_type=9) as wp,
sum(event_type=10) as pb,sum(event_type=11) as bk,
sum(event_type=17) as catch_int,
sum(ab='T') as ab,sum(sh='T') as sh,sum(sf='T') as sf,
sum(outs_on_play) as outs,sum(double_play='T') as gidp,
sum(triple_play='T') as gitp,sum(battedball_type='G') as gb,
sum(battedball_type='F') as fb,sum(battedball_type='L') as ld,
sum(battedball_type='P') as pop,sum(errors) as errs,
sum(pa_balls-pa_int_balls-pa_pitchout_balls) as balls_unint,
sum(pa_int_balls+pa_pitchout_balls) as balls_int,
sum(pa_strikes) as strikes,sum(pa_called_strikes) as called,
sum(pa_swingmiss_strikes) as swingmiss,
sum(pa_foul_strikes) as foul_strike,sum(batter_fate>3) as runs,
sum(batter_fate>4) as Unearned,LI,
pitch_id=gamelogs.vis_starter or pitch_id=gamelogs.home_starter as starts,
pitch_id=gamelogs.winner as win,pitch_id=gamelogs.loser as loss,
pitch_id=gamelogs.save as save,
(bat_team_homeaway=0 and gamelogs.home_score>gamelogs.vis_score) or
(bat_team_homeaway=1 and gamelogs.vis_score>gamelogs.home_score) as team_win,
(bat_team_homeaway=0 and gamelogs.home_score<gamelogs.vis_score) or
(bat_team_homeaway=1 and gamelogs.vis_score<gamelogs.home_score) as team_loss,
park_id as park
from events
inner join gamelogs
on events.game_id=gamelogs.game_id
inner join leverage
on events.game_id=leverage.game_id and events.pitch_id=leverage.pitcher
group by pitcher,events.game_id
order by date DESC,events.game_id DESC;
 
MrX
A lot of this kind of crap:

Code:
create table pitcher_games as
select pitch_id as pitcher,events.game_id,substring(events.game_id,4,8) as date,
events.fielding_team as team,bat_team as opp,pitch_hand as hand,
sum(batter_event='T') as pa,sum(event_type=3) as k,
sum(event_type=14) as unint_bb,sum(event_type=15) as int_bb,
sum(event_type=16) as hbp,sum(event_type=23) as hr,
sum(event_type=20) as b1,sum(event_type=21) as b2,sum(event_type=22) as b3,
sum(event_type=4) as sb,sum(event_type=5) as def_ind,
sum(event_type=6) as cs,sum(event_type=8) as po,sum(event_type=9) as wp,
sum(event_type=10) as pb,sum(event_type=11) as bk,
sum(event_type=17) as catch_int,
sum(ab='T') as ab,sum(sh='T') as sh,sum(sf='T') as sf,
sum(outs_on_play) as outs,sum(double_play='T') as gidp,
sum(triple_play='T') as gitp,sum(battedball_type='G') as gb,
sum(battedball_type='F') as fb,sum(battedball_type='L') as ld,
sum(battedball_type='P') as pop,sum(errors) as errs,
sum(pa_balls-pa_int_balls-pa_pitchout_balls) as balls_unint,
sum(pa_int_balls+pa_pitchout_balls) as balls_int,
sum(pa_strikes) as strikes,sum(pa_called_strikes) as called,
sum(pa_swingmiss_strikes) as swingmiss,
sum(pa_foul_strikes) as foul_strike,sum(batter_fate>3) as runs,
sum(batter_fate>4) as Unearned,LI,
pitch_id=gamelogs.vis_starter or pitch_id=gamelogs.home_starter as starts,
pitch_id=gamelogs.winner as win,pitch_id=gamelogs.loser as loss,
pitch_id=gamelogs.save as save,
(bat_team_homeaway=0 and gamelogs.home_score>gamelogs.vis_score) or
(bat_team_homeaway=1 and gamelogs.vis_score>gamelogs.home_score) as team_win,
(bat_team_homeaway=0 and gamelogs.home_score<gamelogs.vis_score) or
(bat_team_homeaway=1 and gamelogs.vis_score<gamelogs.home_score) as team_loss,
park_id as park
from events
inner join gamelogs
on events.game_id=gamelogs.game_id
inner join leverage
on events.game_id=leverage.game_id and events.pitch_id=leverage.pitcher
group by pitcher,events.game_id
order by date DESC,events.game_id DESC;

Good lord.

I do things like: select homescore1stquarter - awayscore1stquarter as 1stptdiff from gameresults where pointspread = -3; lol
 
Well. The only real difference between that and a GUI interface is that you would be adding inefficient code into your routine. The GUI will essentially output the same code. However, the GUI will take extra time to load and utilize additional resources. I'm assuming that code is for a scraper of some sort... Are you creating individual tables for every game? Perhaps, you could outline what tables you are creating and why...
 
Well. The only real difference between that and a GUI interface is that you would be adding inefficient code into your routine. The GUI will essentially output the same code. However, the GUI will take extra time to load and utilize additional resources. I'm assuming that code is for a scraper of some sort... Are you creating individual tables for every game? Perhaps, you could outline what tables you are creating and why...

I'm creating a new database for a reprogram of my MLB model. It will be made up of tables derived from queries of my play-by-play database (and some other scraped stuff) like the one I posted. Once I get the queries right, they will be handled by my app afterwords. So, what I need is better way to enter, view and save the results of complex queries while I work on them. I think a GUI is probably perfect for that.

I'm going to press onward with HeidiSQL if no one has any other glowing recommendations.
 
The best part is that query gives me half the results correct and the other half are 184467440737 and my Ukranian programmer is nowhere to be found. Time to figure this shit out myself.

There's more than enough info online, of course, but if you're like me and you like a good reference book for things like mysql, I've been very happy with Teach Yourself MySQL.
 
MrX
I'm creating a new database for a reprogram of my MLB model. It will be made up of tables derived from queries of my play-by-play database (and some other scraped stuff) like the one I posted. Once I get the queries right, they will be handled by my app afterwords. So, what I need is better way to enter, view and save the results of complex queries while I work on them. I think a GUI is probably perfect for that.

I'm going to press onward with HeidiSQL if no one has any other glowing recommendations.

Oh.. Okay. Gotcha. You're creating a table with the query data. I guess I'm confused as to why you wouldn't want to do that programmatically. Is there something that requires some subjective decision-making in the process? How many of these queries could you possibly be using? Perhaps you could create a two-step process...
 
]I guess I'm confused as to why you wouldn't want to do that programmatically. Is there something that requires some subjective decision-making in the process?

Yeah, it's just that I'm not great at creating these queries. I have to fumble around with them for awhile to get it right. Once I get each query right, it'll be handled programmatically after that. A two step process is exactly what I'm talking about.

If the GUI isn't working out I'll do what I normally do and write the queries in a text editor and paste them into the command line. But yes, once I have the text of the query correct, it's going into my app and I never have to worry about it again. And, probably only about 8 queries, btw.
 
Hmm. Honestly, I don't know too much about mysql GUI interfaces for Windows since I usually work with it in Linux. But I think I may be overthinking what you are trying to accomplish here. Do you simply want to verify the contents of your query tables as you write them? If not, I'd simply write the command line queries and only use the GUI to verify that your queries are programmatically sound. If that's what you're trying to accomplish almost any GUI should suffice. Sorry, I'm a little under the influence today.
 
If not, I'd simply write the command line queries and only use the GUI to verify that your queries are programmatically sound. If that's what you're trying to accomplish almost any GUI should suffice. Sorry, I'm a little under the influence today.

You're exactly right, any GUI should suffice. I just wanted to see if there was a superior choice.

Also, it was an excuse to fuck around on Gamelive and still feel like I'm working.