Jump to content

MySQL Database Schema


skyace888

Recommended Posts

I'm currently taking a directed project course at my university and need a little assistance setting up the design of a database.  I'm working on a PHP/MySQL program for coaches to track the statistics of a basketball team.  I'm using DBDesigner4 to design the database.  My current model is at [url=http://education.alcodesigns.net/projects/coursework/db_schema9-9-06.gif]http://education.alcodesigns.net/projects/coursework/db_schema9-9-06.gif[/url].  My foreign keys that I have so far:

PLAYERS(TeamNumber) is a foreign key to TEAM(Number)
MEMBERS(TeamNumber) is a foreign key to TEAM(Number)
TIMEOUT_LOG(GameID) is a foreign key to GAME_INFO(GameID)

The sample file with explanations is at [url=http://education.alcodesigns.net/projects/coursework/samplefile.doc]http://education.alcodesigns.net/projects/coursework/samplefile.doc[/url].  I'm not sure how I can efficiently log all the offensive and defensive plays based on the information in the file.  Each play has an outcome that must be recorded as well.  Any suggestions are greatly appreciated!

Thanks,
Al
Link to comment
Share on other sites

http://www.halfadot.com/temp/db_schema.gif

That's a 32kb version of the [b]2Mb[/b] bmp file you posted.  Can you duplicate it to your own server and edit the link in your post ... it'll save everyone who visits a lot of time :)

If you need a free image editor/converter use IrfanView from www.irfanview.com (windoze only)
Link to comment
Share on other sites

Hi fenway!  I don't expect anyone to do my homework for me, rather I came here hoping someone could provide some suggestions and lead me in the right direction.  Anyways, I think I have the "Players", "Team", and "Program" regions in my database map setup correctly.  Those were pretty straightforward.  I'm having difficulty figuring out how to design the "Game" region.  According to the Word sample file, I need to record all the offensive and defensive plays in the game.  I'm not sure if I should make this in one table, called "PLAY_LOG", or have an offensive and defensive log separate.  In addition, every play has an outcome and some of these outcomes need additional fields for player numbers.  I think I have the "GAME_INFO", "TIME_OUT", and "TIMEOUT_LOG" setup correctly.  The program is supposed to be able to allow for queries such as "What was the success rate of play x when players a, b, c, d, and e were on the court?"  I have worked with databases that track orders and products in the past, where there are many examples, however this one is proving more challenging.  Maybe I am not interpreting the sample data correctly...

Thanks,
Allen
Link to comment
Share on other sites

That's the right approach... you should have a play_log table, as you describe, though I would keep all the info together, just flag the play as offensive/defensive.  As far as the "outcomes", if you can come up with some general fields that describe all the plays, then put them in that table, otherwise, break it out.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.