DB Design for Sports

W

Whodat

am new to dynamic web design and am having some trouble designing a db/web
form for a hockey team. I am hoping to have a form that will update the
records for each player on the team.

I have created a table in my DB with the following column headers:

playerid (primary, autonumber)
playername
goals
assists
points
pims
shutouts

whenever I try to update the table from the form I created in dreamweaver,
it overwrites the other entries. Can anyone point me in the right direction?
I have been searching around for most of the day and cant find the answer.

One other thing I was hoping to find out. Is it possible to have the form
update the record so that the numbers are cumulative? For example Tom Smith
has 4 goals in his next game he scores 2 more, I enter 2 into the form and
the database changes his goals record to 6. Is this a possibility?
 
D

Duane Hookom

I would keep records by game. Player information and statistics information
should be kept in separate tables. The statistics table would include the
PlayerID field as a foreign key. The statistics table might include fields
like:
staStaID autonumber primary key
staPlayerID foreign key to player table
staGamID foreign key to a game table
staGoals
staAssists
staPIMs
sta etc

If you have web database questions, you are better off posting them to a
dreamweaver or ASP news group.
 
W

Whodat

Thanks Duane,

I will poke around and give your suggestion a try. I am new to this so I
really wasnt sure where to start


okom@NO_SPAMhotmail.com> wrote in message
 
W

Whodat

Whodat said:
Thanks Duane,

I will poke around and give your suggestion a try. I am new to this so I
really wasnt sure where to start


okom@NO_SPAMhotmail.com> wrote in message
I would like to say thanks again. Using your format this morning I managed
to get it all to work. I am not sure how efficient it is but it is working
:)

I set my StaplayerID lookup to point to Bplayersid from Bplayers, is that
correct for a foreign key? I tried to look up how to do it but didnt have
any luck. But like I said - it is working this way.
I am regretting making my win/loss/tie/shutout inputs (y/N) and am looking
into changing that so I can query those results. But other than that I am
happy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top