|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() 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 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 |
|
|
|
|
|
#2 |
|
SitePoint Member
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. |
|
|
|
|
|
#3 |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() 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 |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 05:28.




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.



Linear Mode
