|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Anyone ever build a gaming database (games website)?
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 |
|
#2
|
||||
|
||||
|
What you have at the moment looks quite good.
I think game previews would be just be a list the game name and blurb about it. |
|
#3
|
|||
|
|||
|
Thanks a.koepke.
offtopic - I apologize for pissing you off yesterday with that link, it wasn't my intentions. I didn't know when posting that link that it would try to load a file save window. sorry again Bryan |
|
#4
|
|||
|
|||
|
I think u've got it :P the site looks like it's going to be simple, that's good, gl =D
as for previews, since the game is coming out anyway just create the game in the [games] and maybe add another field in that table (games): released , which would allow you to filter out the unreleased games... oh another thing, I think you should change the way [categories] and [games] link together, right now I'm guessing ur going to put 0's and 1's in each field in [categories] depending in whether the game is in this category. This method would be slow if you want to filter lots of games, you basically have to scan every single field in the table to say whether 1 game is in this category. I would suggest just assigning a categoryID to each category name and add a field in [games] that links to the categoryID, that way u don't have to do 2 long searches as the categories' select statement will execute quickly that way... so in summary changes: Table: games Fields: gameID (primary) game-name categoryID released Table: categories Fields: categoryID category_Name that reminds me again... I think it's better not to use "-" in any table or field names it might think it's a "minus" use "_" |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Anyone ever build a gaming database (games website)? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|