If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Two semi-noobish questions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-16-08, 10:54
kumiorava kumiorava is offline
Registered User
 
Join Date: Apr 2008
Posts: 1
Question Two semi-noobish questions

Hello,
this is my first post, so let's start with a couple of sorta noobish questions.

A fictive scenario:
I'm developing a very simple and generic browser game. My game has a statistics page, where players can view their progress over time, in form of various graphs.

My database has table 'player':
(id, name, population, army_size, score, ...)
and, table 'player_history':
(player_id, date, population, army_size, score, ...)

My idea is, that 'player' table stores players' current status, and the data in 'player_history' is used to generate the graphs. Each player's status is stored in 'player_history' daily. Now, my first question is, simply, is there any point in this? Is there a better way?

My second, and more important, question goes; if I want to have graphs that show players' ranking progress (highest score, largest army, etc.), should I add fields like 'population_rank', 'army_size_rank', 'score_rank' to 'player_history' table? Or should I use some really fancy join queries when generating the ranking graphs? I know it's possible without those _rank fields, I just don't know how to do it, or which way is smarter...

I apologize if my questions are hard to understand. They were pretty hard to describe especially with English not being my native language...

Thanks!
Reply With Quote
  #2 (permalink)  
Old 04-16-08, 16:46
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
your english is excellent

we cannot recommend a better way than what you've described, because we don't really know what your requirements are
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On