1 2 Previous Next 29 Replies Latest reply on Apr 6, 2012 10:27 AM by MikeProcopio

    How to track teams a player plays for and transactions for a player/team

    MikeProcopio

      Title

      How to track teams a player plays for and transactions for a player/team

      Post

      I'm developing a scouting database for basketball. I would like to track the teams a player plays for as well as transactions involving the player as well if they were traded, waived etc. I would also like to keep track of the general manager that made these transaction. ANy ideas??

        • 1. Re: How to track teams a player plays for and transactions for a player/team
          philmodjunk

          I thought we kicked this idea around already....

          Players----<TeamMembership>------Teams
                                    |
                                    ^
                              TeamPersonnel

          TeamMembership is a join table between Teams and Players. Fields in it can record when the player joined the team, when they left and why. You can either add a field for the GM responsible or you can link to a table of GM records, or even a table of Team Personnel such as Head Coach, Assistant Coaches and GM's. Using a table for the GM depends on whether any additional info would be recorded about the GM other than their name.

          • 2. Re: How to track teams a player plays for and transactions for a player/team
            MikeProcopio

            I'll try this Phil thanks. I know we had it before. So if I wanted to list the whole transaction out for example...

             

            Michael Jordan His Team is The Chicago Bulls. and say he gets traded to the Los Angeles Lakers for Kobe Bryant and The General Manager that made that trade from one team is Joe Smith and the Lakers say its Mike Johnson. Is there a way to log the transaction of Michael Jordan Traded to LA Lakers for Kobe Bryant and have it reflected on each player page as well as if I want to look up the moves as general manager that Mike Johnson and Joe SMith make?? As well as know the years in which these players play for their teams?? I know its a lot ot throw at you just figured I'd ask.

             

            Hey this MAC is ridiculous best invesment that I've ever made.

            • 3. Re: How to track teams a player plays for and transactions for a player/team
              philmodjunk

              Hmm, looks like you need a "trades/Changes" table where you can link in multiple players with fields in this table to document each possible detail of such transitions. My original suggestion works for most but not all of this. If you looked at the TeamMembership record for Michael Jordan after such a trade, You'd be able to see the dates he was a member of each team, the fact that he was traded and who was GM at both teams.

              What would be missing is the link to any other players that were part of the trade...

              I may change my mind after further thought, but I'm thinking in terms of these relationships:

              Players----<TeamMembership>----TradesChanges----<PlayersInvolved

              Where PlayersINvolved is an occurrence of the players table.

              I think this will work for both multi-player and Multi-team deals as well as someone just resigning in one season and unresigning at a future date.

              • 4. Re: How to track teams a player plays for and transactions for a player/team
                MikeProcopio

                Yeah so I would want to see the transaction of "Chicago Bulls Trade Michael Jordan for Kobe Bryant" and establish that the Bulls made a trade as well as the Lakers. and both GMs made these trades. So I can go back and study what GMs made what moves. As well as have a transaction list for the players of all the transactions that they were involved in.

                • 5. Re: How to track teams a player plays for and transactions for a player/team
                  philmodjunk

                  That should all be possible with the following suggested structure. TradesChanges would have a "Chicago Bulls Trade Michael Jordan for Kobe Bryant" entry,

                  TeamMembership----<TeamsInvolved>------TradesChanges----<PlayersInvolved>----Players

                  PlayersInvolved andTeamsInvolved would be join tables listing 0 to many players and 0 to many teams involved in a given record in TradesChanges. GM's could be identified in the TeamMembership table (or linked to it).

                  • 6. Re: How to track teams a player plays for and transactions for a player/team
                    MikeProcopio

                    Ok so Players is just the table I've been working with all along with player ID's and such

                     

                    Players involved would just have an ID field??

                    Trades Changes would have an ID as well as the transaction??

                    Teams Involved do I need to create a new table for this with all of the teams ?

                     

                    What should team membership have as fields in that table and how exactly does that work?

                    I know you probably told me that a million times, I've been dealing with being in away and having my HP laptop IP address die on me so I had to overhaul and get 2 MAC machines. I'm just getting back in the swing of things

                     

                     

                     

                    • 7. Re: How to track teams a player plays for and transactions for a player/team
                      philmodjunk

                      The "involved" tables would be join tables storing the IDs of the related records on either side of them. You create one record in TeamsInvolved for every team that is involved in the change. Somebody get's clever and set's up a 5 way swap with 20 players chaning teams, no problem the DB can still handle it as you add "inolved" records for every team in the TeamsINvolved table and "involved" records for every player involved in PlayersInvolved. Thus TradesChanges would have it's own ID along with as many fields are needed to document such a team change.

                      TeamMembership would be a join table used to link players to teams (remember the HS scouting DB's Set up?). While pro players only play for one team at a time, you can date the entries in this table to list all the past teams for a given player.

                      • 8. Re: How to track teams a player plays for and transactions for a player/team
                        MikeProcopio

                        For teams involved I have a table for teams that have ID#s already for them. SO this is seperate.

                         

                        If so if the Chicago Bulls make a trade today say their serial number is 5 and then they make a trade tomorrow do I enter them again in Teams Involved as a different serial number?? From what I am reading it sounds like I would??

                         

                        I just want to solve this question by question this way instead of getting a million things at once rather tackle it one at a time

                        • 9. Re: How to track teams a player plays for and transactions for a player/team
                          MikeProcopio

                          ANd as well for players involved. If I enter Michal Jordan today and gets traded a month from now since it is a different trade do I enter a new Michael Jordan with a new serial number?? 

                          • 10. Re: How to track teams a player plays for and transactions for a player/team
                            MikeProcopio

                            THis is the screenshot of my DB. I havent started the new tables on it yet 

                            • 11. Re: How to track teams a player plays for and transactions for a player/team
                              philmodjunk

                              IF the Chicago Bulls made two trades and it's ID number is 5, then there would be two Teams Involved records with 5 in them to identify the Bulls as the team involved. A second ID, the ChangeTradeID from that table would also be entered in both records and this value would be different for each to link to two different TradeChange records.

                              The same is true for PlayersInvolved.

                              If Michael Jordan were part of two such ChangeTrades, his ID from Players would appear twice in PlayersInvolved, but each also with a different ID from ChangeTrade.

                              I am suggesting that you change the current set up for managing team membership to match that of your Highschool Scouting database we have discussed privately.  Set up a join table between Players and Teams so that you can document a player's membership in different teams over the course of their career. I'd do that first and get it working before adding the additional tables and relationships needed to document all parties involved in a team membership change.

                              • 12. Re: How to track teams a player plays for and transactions for a player/team
                                MikeProcopio

                                Ok so for every trade there will be two records entered in team involved documenting both teams and the transaction serial number will be the same in both as well?

                                 

                                I'm starting to grasp it. I'll go back to the file you sent me with the teams a player played for and try to create that.

                                • 13. Re: How to track teams a player plays for and transactions for a player/team
                                  philmodjunk

                                  Ok so for every trade there will be two records entered in team involved documenting both teams and the transaction serial number will be the same in both as well?

                                  If by tranaction, you mean the ID number from the tradesChanges table and if there are only two teams invovlved, then yes. While most trades are between two teams, I can imagine that three-way or more-way transactions are at least possible and this database structure will work for them also.

                                  • 14. Re: How to track teams a player plays for and transactions for a player/team
                                    MikeProcopio

                                    OK going to start working on it , are you around toay ??

                                    1 2 Previous Next