Go Back   SitePoint Forums > Forum Index > Program Your Site > Databases
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Nov 12, 2003, 19:31   #1
jag5311
SitePoint Wizard
 
jag5311's Avatar
 
Join Date: Jan 2003
Location: Somewhere in Indiana
Posts: 3,226
Anyone ever do a database for a gaming site?

I am in a rut. I am trying to logically setup a database for a gaming website, and I am stuck. It all comes down to separating the games. I just need to know if I am doing this right.

Ok here is what I currently have

Code:
Table: games
Fields:
gameID (primary)
game-name
 
Table: categories
Fields:
Action
Sports
RPG
etc..
 
Table: cheats
Fields:
cheatsID
gameID
cheat-info
cheat-title
 
Table: reviews
Fields:
reviewID
gameID
review-info
author
author-email
rating
 
Table: walkthru
Fields: 
walkthruID
gameID
walkthru-info
 
Table: screenshots
Fields:
screenshotID
gameID
smallpath
largepath
 
Don't quite know what to do with previews, 
as it shouldn't have a preexisting gameID in the database if its not fully functional.
 
so
 
Table: preview-games
Fields: Null (for now)
 
table: friends
Fields:
friendID
sitetitle
sitedescription
siteurl
 
Table: news
Fields
newsID
newstitle
shortdescription
news-url
news-full
NOw I have it setup this way so that if someone clicks lets say, "Super Mario Bros: 2030 j/k, that a list of the cheats currently for that game will be listed, hence why i have in the table, the field gameID and gamename. Then gameID in table cheats has a relationship with the one in the table games.

Make sense?

If there are any other recommendations, I would appreciate it.

Thanks
Bryan
jag5311 is offline   Reply With Quote
Old Nov 13, 2003, 16:42   #2
13tenMedia
SitePoint Member
 
13tenMedia's Avatar
 
Join Date: Aug 2003
Location: Portland
Posts: 20
If I understand it all, most of it look like it will work well.

In regards to preview, have you thought about making that a field in games? That way if things came available for the preview you could add the data w/o redundancy in tables. Would news be associated with games? If so, you may want a game-id there also.
13tenMedia is offline   Reply With Quote
Old Nov 13, 2003, 16:52   #3
jag5311
SitePoint Wizard
 
jag5311's Avatar
 
Join Date: Jan 2003
Location: Somewhere in Indiana
Posts: 3,226
Thanks 13tenmedia.

That is a good idea for the preview section

I had another idea. That would be to not have a preview table, but what I would do is in the games table, have a field that is considered a "weight" Like, 1 meaning yes, 2 meaning no. Well, any game that would be a standard game (no preview) there would be a 2 in that field. When a new game (a preview) would be inserted into the database, it would be given a value of 1 (yes) and then on a page like, preview.cfm I would only call for games containing a previewID of 1. Then I would limit the info given.

So in the form for an INSERT NEW GAME or something, I would fill out only part of it that applied to being a preview, and on the preview page, only show information such as screenshots, title, short summary, or something like that.

This way,I can do something like you said without creating a new table.

Thanks
Bryan
jag5311 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
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 On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 05:28.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved