List:General Discussion« Previous MessageNext Message »
From:Claudio Nanni Date:September 1 2010 12:12pm
Subject:Re: Database design help
View as plain text  
Hi there,

I know you would like just a solution, but I want to give you just a little
bit of background.

Think in real life things(entities), think as you would have to do it on
paper.


[1]
You said you have:

managers, teams players and fixtures/results (matches)

these are your tables

plus.... teams!

[2]
then find what relationships you have between tables.

(a) *manager* (have name and other properties) belongs to a team
(b) *player* (have name and other properties)  belong to a team
(c) *team* (have name , have 1 manager, and other properties) play matches
(d) *match* have results

translate [have] with properties(columns with values of the table)
translate other actions with relationships (columns with ids of other
tables)

in the case of *match* you would have: idteam1, idteam2, result   at least.
in the case of *player* you would have:  idplayer, name, idteam    at least
in the case of *manager*, if you think a manager can manage more than one
team you will use an idmanager in the team table
otherwise you can use also an idteam in the manager table that allows more
managers to manage the same team.


I dont want (no time sorry!) to write here the data model, but I think this
few lines can trigger the best idea in you.


Claudio






2010/9/1 Tompkins Neil <neil.tompkins@stripped>

> Looking for some help / comments if possible ?
>
> Cheers
> Neil
>
> ---------- Forwarded message ----------
> From: Neil Tompkins <neil.tompkins@stripped>
> Date: Tue, Aug 31, 2010 at 8:48 PM
> Subject: Database design help
> To: mysql@stripped
>
>
> Hi
>
> I've a soccer application consisting of managers, teams players and
> fixtures/results. Basically each manager will get points for each game
> which
> will depend on the result.
>
> What would be the best table design bearing in mind that a manager can move
> to a different club.
>
> My thought was to have a field in the fixtures/results table for the
> manager
> points but i think that I will also need a users field so that I can
> remember which points belong to which manager.
>
> Is this the correct approach??
>
> Cheers Neil
>



-- 
Claudio

Thread
Database design helpNeil Tompkins31 Aug
  • Fwd: Database design helpTompkins Neil1 Sep
    • Re: Database design helpClaudio Nanni1 Sep
    • RE: Database design helpwebmaster1 Sep
  • RE: Database design helpJerry Schwartz1 Sep
    • Re: Database design helpTompkins Neil1 Sep
      • Re: Database design helpMySQL)1 Sep