A09: Lahman’s baseball db

This assignment helps you practice with data import. You will import data from Lahman’s Baseball Database CSV files into MySQL tables.


Create tables to store the information listed below (and no extra info). Your tables must be normalized and include primary keys, foreign keys, and other indexes as appropriate. Also use appropriate column types and meaningful column names rather than the shorthand used in the CSV files. Populate the tables with data from the CSV files. You should import data regarding 17,725 players and 110 teams spanning years 1871-2015. See Lahman’s README.txt for info about the CSV files. The CSV files are available on londo in the directory /tmp/baseball, which MySQL can access.

Store this information:


Your SQL code should include the table creation and LOAD DATA commands. Use your own database, e.g., cinf201_jeckroth.

cinf201-submit A09
CINF 201 material by Joshua Eckroth is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. Source code for this website available at GitHub.