Loading ...
Sorry, an error occurred while loading the content.

3620Re: [baseball-databank] 2008 Update this week or early next

Expand Messages
  • robert bluestein
    Nov 11, 2008
    • 0 Attachment
      You can do it that way, but SABRE prefers it to be the other way.
       
       


      --- On Tue, 11/11/08, Tangotiger <tangotiger@...> wrote:
      From: Tangotiger <tangotiger@...>
      Subject: Re: [baseball-databank] 2008 Update this week or early next
      To: baseball-databank@yahoogroups.com
      Date: Tuesday, November 11, 2008, 6:18 AM

      It is usually desirable to go vertically, than horizontally, like so:
      http://sports. groups.yahoo. com/group/ baseball- databank/ message/3606

      You can create more codes, without altering the number of columns.  So, you can include stuff like batting order and the like.  From there, you can always convert the subset you need to map horizontally.

      Tom


      ------------ --------- --------- --------- ------

      --- On Mon, 11/10/08, Sean Forman <sean-forman@ baseball- reference. com> wrote:
      From: Sean Forman <sean-forman@ baseball- reference. com>
      Subject: [baseball-databank] 2008 Update this week or early next
      To: "Baseball Databank" <baseball-databank@ yahoogroups. com>
      Date: Monday, November 10, 2008, 12:51 PM

      I've made good progress on the BDB update for this year and should have something soon.

      I'm adding an Appearances table with the following schema (this will have data from 1973 on for the AL and 1974 on for the NL).  Corresponding to complete retrosheet data for the NL and the start of the DH for the AL. 

      I'm open to suggestions, but in Batting, I think I'm going to put an entry in for every player who played and then  add a column G_bat that will show how many games they appeared in the lineup, so pre-Interleague AL pitchers will have their games pitches in G and then 0 for G_bat and nulls for the values of the batting stats.

      Feedback?

      sean

      CREATE TABLE `Appearances` (
        `yearID` smallint(4) NOT NULL default '0',
        `teamID` char(3) NOT NULL default '',
        `lgID` char(2) default NULL,
        `playerID` char(9) NOT NULL default '',
        `G_all` tinyint(3) unsigned default NULL,
        `G_batting` tinyint(3) unsigned default NULL,
        `G_defense` tinyint(3) unsigned default NULL,
        `G_p` tinyint(3) unsigned default NULL,
        `G_c` tinyint(3) unsigned default NULL,
        `G_1b` tinyint(3) unsigned default NULL,
        `G_2b` tinyint(3) unsigned default NULL,
        `G_3b` tinyint(3) unsigned default NULL,
        `G_ss` tinyint(3) unsigned default NULL,
        `G_lf` tinyint(3) unsigned default NULL,
        `G_cf` tinyint(3) unsigned default NULL,
        `G_rf` tinyint(3) unsigned default NULL,
        `G_of` tinyint(3) unsigned default NULL,
        `G_dh` tinyint(3) unsigned default NULL,
        `G_ph` tinyint(3) unsigned default NULL,
        `G_pr` tinyint(3) unsigned default NULL,
        PRIMARY KEY  (`yearID`,`teamID` ,`playerID` )
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1;



      --
      Sean Forman
      President, Sports Reference LLC
      http://www.sports- reference. com/


    • Show all 7 messages in this topic