|
|||||||
| Database Tools Do you need to take a dump? SQL gurus welcome |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,751
|
AUWhenWin
I started the work on this program, slowing getting something to work. Some complex stuff I have to do in it!
I struggled with the players, so I switched to the team stuff first, and that went easier. No screenshot yet, as it is too ugly, but using it, I see that the Tigers in 1963 went 72-90. Runs scored: 1 12-12 2 12-18 3 8-12 4 6-9 5+ 31-34 I am going to go ahead and break that down further, from 6-9 then a 10+. Also do the same for runs allowed. I also had it check for games when they had an error. With no errors, they were 37-39, when they had +1 errors, they were 35-51. I still have to tweak the numbers, as something is wrong, as the Win totals under runs is 69, so I am missing 3 games. Obviously, if they scored zero runs, they did not win the game. The error numbers are correct. Now it gets more complicated, as I have to access another CSV file and do some figuring out. Some of the things I want to add are: (Please suggest some for me) When leading after 8 innings When leading after 7 innings When leading after 6 innings (Might as well include innings 1-8) When scoring 1st When someone on the team hits a HR. Some other things that may be a little easier, would be some streak things: (These are for the team) Games in a row with an extra base hit Games in a row with a HR Consecective shutout innings and being shutout For the Hitters: W/L when player hit HR W/L when player started W/L when player hit HR player got 2 or more hits W/L when player hit HR player batted 1st W/L when player hit HR player batted 2nd (and rest of places in lineup) W/L when player hit HR player was DH W/L when player hit HR player scored a run W/L when player hit HR player knocked in a run Maybe also some streak records: Hits in a row Getting on base in a row Walks in a row K's in a row Most ABs in a row w/o a HR Most ABs in a row w/o a hit Most ABs in a row w/o a walk Pitchers: Team record when he started the game Team record when he lasted 5, 7, 8, 9 innings Team record when he allowed a HR Team record when he allowed XX runs Team record when he allowed XX walks Team record when he allowed XX K's Streaks: K's in a row W's in a row Hits in a row Batter on base in a row Consective shutout innings Basically, when you are listening to a game on the radio/TV and they throw out one of those oddball stats, write it down and post it in here. That is what I am looking for. I think I may have to start from scratch again and redesign it, maybe creating a database that contains all this data and then using SQL to access it. That way you can define the parameters that you want. So, I may work on importing all of the CSV files that are needed into a SQL database. I have not done this before, as there has been a stumbling block in creating the database. I do have some new books, so, I will give it a try.
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
|
|
|
|
|
|
#2 (permalink) | |
|
All Star Starter
Join Date: Apr 2006
Posts: 1,453
Thanked 14x in 7 posts
|
Quote:
.NET 3.0 makes this easy with LINQ. You can use sql server express to set up a database and use it like any other object or data structure. I haven't played with it extensively, but what have worked with is extremely easy.
__________________
GM Washburn Sea Wolves Dog Days Baseball 1981 Kennel Cup Champions! GM Shreveport Sports SOBL Download my newest utility, ScoutingTracker! Development tracking for leagues that use scouting! And yes, there are graphs... Try out my Development Tracker... it's got graphs! and... stuff... Check out TeamRater Lite 1.2.2! No graphs, but it's got stuff, too! |
|
|
|
|
|
|
#3 (permalink) |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,751
|
My biggest problem with SQL is how does it set up the SQL database on the 'users' computer. Do they have to manually set up the ODBC settings? I guess I could create a small sample program and deploy it on one of my other computers.
I tried writing one today. I can easily create the SQL database, but I had to manually create the tables. I am looking for an easy way to just import all of the CSV files into a SQL database. I guess I do not need all of them. Once I get them into a SQL database, manipulating the data will not be too hard for me. I have read quite a bit on writing SQL code. I did have one event that made me throw my hands up in the air and hit that X in the corner. I created a sample database, and everything worked good. (I have SQL 2008 on here), but when I manually entered some data, then closed the program, then reopened it, the data was not there. It dawned on me later that there was a setting that had to do something with copying the database to the work folder or something. I remember having this problem a couple of years ago when I started to tackle the problem.
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
|
|
|
|
|
|
#4 (permalink) |
|
All Star Starter
Join Date: Apr 2006
Posts: 1,453
Thanked 14x in 7 posts
|
The program installer will install a small DB instance on the user machine.
__________________
GM Washburn Sea Wolves Dog Days Baseball 1981 Kennel Cup Champions! GM Shreveport Sports SOBL Download my newest utility, ScoutingTracker! Development tracking for leagues that use scouting! And yes, there are graphs... Try out my Development Tracker... it's got graphs! and... stuff... Check out TeamRater Lite 1.2.2! No graphs, but it's got stuff, too! |
|
|
|
|
|
#5 (permalink) |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,751
|
I restarted the program, using a different layout. Here is an EARLY peek at the layout. It now uses an HTML page to display the results. Shown here is just the HRs by inning and the HTML has not been tweaked to make it look pretty.
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
|
|
|
|
|
|
#6 (permalink) |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,751
|
The position toggle button switches between a list of hitters and a list of pitchers on the left.
The Toggle Hitter will be renamed, but under the player info in the main content section is a table showing the players game by game results. Hitting the button shows that table. The reason for the HTML is that way, on line leagues can upload the generated HTML code to their site so the GMs can see this stuff.
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
|
|
|
|
|
|
#7 (permalink) |
|
Major Leagues
Join Date: Mar 2007
Location: Bluffton, South Carolina
Posts: 312
|
Larry
Is this ready to use yet?
__________________
Between The Lines Baseball League - Commissioner/New York Yankees GM Beyond The Ivy - New York Yankees GM Golden Era Baseball - Brooklyn Dodgers GM |
|
|
|
|
|
#8 (permalink) |
|
Hall Of Famer
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,751
|
Not even close. It is slow going, as I sneak the work in when I want a break away from my work. It is in the early stages.
Keep your eye on this thread for updates. I usually have it ready to try before it is complete though. I could make it available now, but just not enough information is displayed yet.
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
|
|
|
|
|
|
#9 (permalink) |
|
Major Leagues
Join Date: Mar 2007
Location: Bluffton, South Carolina
Posts: 312
|
Any updates on this
__________________
Between The Lines Baseball League - Commissioner/New York Yankees GM Beyond The Ivy - New York Yankees GM Golden Era Baseball - Brooklyn Dodgers GM |
|
|
|
|
|
#10 (permalink) |
|
All Star Starter
Join Date: Dec 2005
Location: Las Vegas, Nev
Posts: 1,759
Thanked 3x in 3 posts
|
Larry, can you give us a list of all of your utilities that will work for 2009? And are you still thinking of a newspaper type layout? That would be great for dynasties and maybe leagues.
__________________
Elder Statesman of the Boardhttp://www.soxxcountry.com/ site with Duffys Tavern Live OOTP Chat Room Soxx World of Baseball Commissioner |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|