Note that there are some explanatory texts on larger screens.

plurals
  1. POIncremental MySQL database design where future needs are unknown
    primarykey
    data
    text
    <p>I am using MySQL, InnoDB, and running it on Ubuntu 13.04. </p> <p><strong>My general question is:</strong> If I don't know how my database is going to evolve or what my needs will eventually be, should I not worry about redundancy and relationships now?</p> <p>Here is my situation:</p> <p>I'm currently building a baseball database from scratch, but I am unsure how I should proceed. Right now, I'm approaching the design in a modular fashion. For example, I am currently writing a python script to parse the XML feed of a sports betting website which tells me the money line and the over/under. Since I need to start recording the information, I am wondering if I should just go ahead and populate the tables and worry about keys and such later. </p> <p>So for example, my python sports odds scraping script would populate three tables (Game,Money Line, Over/Under) like so:</p> <pre><code>DateTime = Date and time of observation Game +-----------+-----------+--------------+ | Home Team | Away Team | Date of Game | +-----------+-----------+--------------+ Money Line +-----------+-----------+--------------+-----------+-----------+----------+ | Home Team | Away Team | Date of Game | Home Line | Away Line | DateTime | +-----------+-----------+--------------+-----------+-----------+----------+ Over/Under +-----------+-----------+--------------+-----------+-----------+----------+----------+ | Home Team | Away Team | Date of Game | Total | Over | Under | DateTime | +-----------+-----------+--------------+-----------+-----------+----------+----------+ </code></pre> <p>I feel like I should be doing something with the redundant (home team, away team, date of game) columns of information, but I don't really know how my database is going to expand, and in what ways I will be linking everything together. I'm basically building a database so I can answer complicated questions such as: </p> <p>How does weather in Detroit affect the betting lines when Justin Verlander is pitching against teams who have averaged 5 or fewer runs per game for 20 games prior to the appearance against Verlander? (As you can see, complex questions create complex relationships and queries.) </p> <p>So is it alright if I go ahead and start collecting data as shown above, or is this going to create a big headache for me down the road?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload