|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
help needed with design db
Hi,
with a few friends i play some boardgames. Suddenly we felt the need for some statistics, so i thought i'd do the job. But i don't know how to make 1 table. i have right now
but what should the third table look like is this the proper way
or should it be like this
I hope my problem is clear. with all those lists. It's hard to explain it in words, so i hope the reallife example will speak for itself. thanks for any help, Sarnix |
|
#2
|
||||
|
||||
|
if i'm correct the combination of game_id and player_id gives you a unique key to identify the third table, so to my oppinion
1 player_id 2 game_id 3 score 4 date 5 etc.. would be sufficient. You could give the table a unique key for itself, but that's not required. 1 played_game_id 2 player_id 3 game_id 4 score 5 date 6 etc.. I prefer the first option. Put the player_id before the game_id in the table, since there are fewer players than games ( i hope) Also you might want to reconsider using the underscore "_" in table names what's wrong with "playerId" ?
__________________
Now is the winter of our discontent made glorious summer by this son of York. |
|
#3
|
|||
|
|||
|
thanks for your answer Targaz
i see, but would you put multiple players + their scores in 1 record or make a seperate record for each player with his/her score? i kinda got used to the underscore. is there a serious reason to reconsider? ( sidenote: so far there are more players than games ( kolonisten(dutch), civilization and la citta)) |
|
#4
|
||||
|
||||
|
Ah now I see, a game is not a match but a (board)game.
Silly me (game/set/match)That could make things a bit more difficult (read interesting). One entry per game per player per match (date?). Something like this ? game game_id game_name player player_id player_name match match_id match_date game_id // one boardgame - one match playedgames match_id player_id score - one record for each player that playes the match Don't pin me down on this, I made it up in five minutes. Maybe you could read some books or search the web on database-design. Comment anybody?I'm not sure every databasesystem supports underscores that happily. Again comment anybody? Always happy to help someone who playes Kolonisten van Catan. |
|
#5
|
|||
|
|||
|
Ah yes, that makes sense.
I thought of 3 tables, but 4 tables and the way you describe them seems very suitable for my situation. thanks, Targaz. Note taken about the underscore. mysql has no problems with them, so it'll be allright for now. hehe, you might want to try La Citta if you're looking for a new game to play. |
|
#6
|
||||
|
||||
|
Quote:
Looks fine to me ![]() Quote:
__________________
There are 10 types of people in this world - those who understand binary and those who don't... PHP | MySQL | DevShed Forum Search | Google Search |
|
#7
|
||||
|
||||
|
I don't think it exists outside europe. Did anyone ever play the computerversion ? That is some sad software. The game is somewhat altered, but they translated from German to Dutch by some who has obviously never done that before.
Above that the IA-players are the most anyoing thing I have ever seen in my life in a computergame. Since when do people in Enschede have acces to the internet? ![]() |
|
#8
|
|||||
|
|||||
|
Quote:
![]() Quote:
) a game... still prefer the boardgame though since it's much nicer to have some heated discussions with friends when they block my streets or resources etc.. Quote:
![]() Sigh... people from the randstad ![]() |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > help needed with design db |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|