<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Baseball Simulator &#187; rookie</title>
	<atom:link href="http://baseballsimulator.com/blog/tag/rookie/feed/" rel="self" type="application/rss+xml" />
	<link>http://baseballsimulator.com/blog</link>
	<description>Source for baseball simulation, Stratomatic online, baseball cards, baseball statistics, boxscores, and scripts.</description>
	<lastBuildDate>Wed, 14 Sep 2011 22:28:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<image>
<link>http://baseballsimulator.com/blog</link>
<url>http://baseballsimulator.com/blog/favicon.ico</url>
<title>Baseball Simulator</title>
</image>
		<item>
		<title>New baseball database</title>
		<link>http://baseballsimulator.com/blog/2009/07/09/new-baseball-database/</link>
		<comments>http://baseballsimulator.com/blog/2009/07/09/new-baseball-database/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 04:44:11 +0000</pubDate>
		<dc:creator>Bill</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[baseball database]]></category>
		<category><![CDATA[rookie]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://baseballsimulator.com/blog/?p=634</guid>
		<description><![CDATA[In April, I wrote about building a baseball database of statistics for every player including those playing in the current 2009 season.  After several weeks working on it I have finally completed the database.   I had no idea it would be so complicated to build such a database but I learned a lot. My first [...]]]></description>
			<content:encoded><![CDATA[<p>In April, I wrote about <a href="http://baseballsimulator.com/blog/2009/04/07/baseball-hacks-database/">building a baseball database</a> of statistics for every player including those playing in the current 2009 season.  After several weeks working on it I have <a href="http://baseballsimulator.com/database/">finally completed the database</a>.   I had no idea it would be so complicated to build such a database but I learned a lot.</p>
<p>My first hurdle was learning about .<a href="http://en.wikipedia.org/wiki/Htaccess" target="_blank">htaccess </a>.  I&#8217;ve forgotten exactly what .htaccess is for but I used it to redirect query results of players so each player will have their own unique URL page.</p>
<p>I then had to determine a way to separate the batting and pitching queries so when a pitcher is being searched you will get his pitching stats rather than batting stats.   Later, I&#8217;ll be able to have all of these stats on each player page</p>
<p>I thought it was important to be able to access <a href="http://baseballsimulator.com/database/batting/ruthba01">Babe Ruth&#8217;s</a> batting and pitching stats.  So, I added pitching stats to position players who also had pitched in their career.  Check out <a href="http://baseballsimulator.com/database/batting/cansejo01">Jose Canseco</a> and <a href="http://baseballsimulator.com/database/batting/finlest01">Steve Finley&#8217;s</a> pitching stats.</p>
<p>If you are familiar with databases you know that every record must have a unique ID.  When dealing with the current 2009 season, one of the challenges was trying to find a way to generate a unique ID for all rookie players.  First, I needed to find a way to determine if a player is indeed a rookie.  Then, I had to find an automated way to generate a unique ID.  I spent a few days working on a stored procedure.  This stored procedure will scan the entire master database for duplicates and if duplicates are found, the number at the end of the ID will be incremented.</p>
<p>The method I was using for determining rookies had a flaw because I was searching for players who were playing in the 2009 season but hadn&#8217;t played in 2008.  The drawback to this was that some players, like <a href="http://baseballsimulator.com/database/pitching/bensokr01">Kris Benson</a>, had been out of baseball for a few years so they weren&#8217;t actually rookies.  I had to go back and find the IDs for these players and ensure they weren&#8217;t considered new rookie players.</p>
<p>Each day I work on the database I always seem to find a mistake somewhere.  The other day, I noticed <a href="http://baseballsimulator.com/database/batting/rolensc01">Scott Rolen&#8217;s</a> 2009 AB totals were a little off.  For some reason, I missed the stats from one day in June so I had to go back and fix that.</p>
<p>Another thing I noticed was <a href="http://baseballsimulator.com/database/batting/tejadmi01">Miguel Tejada&#8217;s</a> batting average in my database didn&#8217;t match the batting average from other sites.  After some research, I found that if a game was suspended due to rain I wasn&#8217;t updating the database.</p>
<p>Another glitch is I don&#8217;t have any 2009 stats for HBP, BK, and WP categories for pitchers.  I still need to find a way to gather this data.</p>
<p>I&#8217;m sure I&#8217;ve overlooked some other things.  If anyone notices any errors please let me know.</p>
<form action="http://baseballsimulator.com/database/master_list.php" method="get">
<input name="value" type="hidden" value="1" />
<input name="SearchFor" size="30" />
<input type="submit" value="Search" />
<input name="SearchOption" type="hidden" value="Contains" />
<input name="SearchField" type="hidden" /></form>
]]></content:encoded>
			<wfw:commentRss>http://baseballsimulator.com/blog/2009/07/09/new-baseball-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

