Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-18-2004, 12:39 AM
DJ RRebel DJ RRebel is offline
 
Join Date: Jul 2002
Location: CANADA
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default MySQL Table Theory Help

OK guys ... finally going to make the BIG plunge and start all the hacks I've been waiting for a 'reliable and proven' vB3 before starting!

I feel like that time has arrived!

Anyhow, What I want to do (I have a club music site), is start a new review forum. But I'd like to add seperate fields for:

- Artist Name
- Song Title
- Remix Name
- Release Year
- Record Label
- Genre(s)
- Sub-Genre(s)
- Review (Post Table: pagetext)
- Review Author (Post Table: username)
- Review Date (Post Table: dateline)

?- Some field to relate the REVIEW table to the THREAD table [not sure of this, see below, would be the thread number of the song reviewed]


Also an unfixed (0 for now, but could be 1 or 2 or 3 depending on the artist's submission and alternate download servers) amount of:

- Download Server Icon
- Download Link
- Show Download Link Start Date (not sure yet)
- Show Download Link End Date (not sure yet)

?- Some field to relate to REVIEW or THREAD table.


I want the "Thread" title to be in a format (artist name) song title (remix name YEAR)


Now, considering the size of my forum (20,000+ members, 32,000 threads, 265,000 posts, 25 forums), would it be best for me to just start a new table (or two) and then somehow relate the new table with artist name and the rest to the THREAD table? Or should I just add a few columns to the THREAD table? Would doing it one way or the other slow things down considerably?



I don't really know PHP / MySQL at all, but I do understand the theory and usually can manage to get things right after alot of trial and error .. lol ... anyhow, I think this is what I should do, although PLEASE correct me if I'm wrong, or also let me know if I'm doing it right?


1- Add a 'is_review_forum' column to the FORUM table.


2- Create a new REVIEW table.


3- Create various REVIEW table fields (excluding the ones already covered in the POST table).


4- Create a new DOWNLOAD table.


5- Create various DOWNLOAD table fields.


6.A- Create REVIEW_ID column in the THREAD table to relate/link the thread to the correct review.
OR
6.B- Create THREAD_ID column in the new REVIEW table to relate/link the review to the correct thread.


7.A- Create DOWNLOAD_ID (array?) column in the REVIEW table to list all (if any) DOWNLOAD rows affiliated with the review.
OR
7.B- Create REVIEW_ID column in the DOWNLOAD table to relate/link the download data to the correct review.
OR
7.C- Create THREAD_ID column in the DOWNLOAD table to relate/link the download data to the correct thread.


8- Get into the vB3 PHP coding for new thread and add an IF 'is_review_forum' then show various REVIEW input fields and DOWNLOAD fields (times whatever max number of downloads I think any review could have).

(8.1)- I guess I could also just have a "# of Download Links To Add" drop down field showing [0 to X] so that on the next page have the corresponding number of DOWNLOAD field input boxes if any. But I think that's getting a bit too ahead of myself and complicated ... lol.


9- Remove the Thread title entry box and create the THREAD table's thread_title field on submission using the Artist Name, Song Title, Remix Name and Release Year fields.


10- Tinker with the submission PHP page to store the appropriate data in the appropriate tables (don't know how to do this, but it shouldn't be too hard to figure out I'm hoping, and I can look up that alot easier than the actual theory).


11- Tinker with all the PHP pages that display forum and thread data to get/call the proper data fields if the forum is 'is_review_forum'


12- Tinker with whatever template I want to show the new data.


13- Pray that I don't kill my forum/database !!! lol




Q1- I think the above would be more efficient than simply adding all the new fields to the thread table! Although again, please confirm this for me. Would be appreciated!


Q2- Where do I put the relational fields (6.A or 6.B ... and ... 7.A or 7.B or 7.C)? In the new REVIEW table (with a column indicating the thread_id of the review?), or add a 'review_id' in the POST table that would lead to the unique key field of the new REVIEW table? Not sure which way is best or most efficent.


Q3- Do you all consider vB3 established enough to do this sort of hack?


Q4- Is there anything else you recomend I may have missed or overlooked?



I think that explains it all ... my site is www.homeofmusic.com , but the forum is hosted at http://www.homeofchat.com/vB/

Thanks to all for your help/feedback ... even if it's just to say I'm on the right track !!!
Reply With Quote
 


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

Forum Jump


All times are GMT. The time now is 11:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04142 seconds
  • Memory Usage 2,460KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete