Designing a game database

Posted by Ronald on Stack Overflow See other posts from Stack Overflow or by Ronald
Published on 2010-04-20T03:22:05Z Indexed on 2010/04/20 3:23 UTC
Read the original article Hit count: 493

Filed under:
|
|
|

I'm trying to design a database to record game histories for a game I'm working on. I have 3 different tables: users, gamehistories, and gamescores.

Columns for tables:

users: uid, displayname, email
gamehistories: gid, pubID, start (datetime), end (datetime)
gamescores: gid, uid, score

I am trying to produce the following result set given a userID (uid):
Opponent's displayname, my score, opponent's score, duration

Any ideas? Is my design ok? How can I query these tables to get game histories for a given uid?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about sql