Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Custom Thread Fields >> Custom Tables?
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #11
RE: Custom Thread Fields >> Custom Tables?
(04-14-2011 02:00 AM)RateU Wrote:  I really really don't know what magic has been done with this table Oops
When I try to create my own table, I never succeed to make it optimized like that table Biggrin
I don't really see how.  There's nothing particularly special, just a table that is usually joined with the threads table...

(04-14-2011 06:08 AM)Firefox Wins Wrote:  If (for example) someone was asking a question about planning to code a custom CMS and they said "...the events are stored in `cms_events` table and downloads are stored in `cms_downloads` table."
Oh okay, I see where you're comming from now.

Yes, it's "better" to have separate tables as it means less redundancy (XThreads will have heaps of blank cells with different applications) and it models the data more closely, as well as provide more flexibility.  It's basically what separate tables are for.
On the other hand, XThreads does not have a predefined data model (for threadfield data).  It relies on the user to provide the structure.  This already erodes some of the advantages of a dedicated data model.
There are quite a number of other problems XThreads needs to respond to that your CMS example doesn't need to worry about.  For example, it will never be possible to move an event into a download, but for XThreads, it's certainly possible for a moderator to move a thread from the events forum to the downloads forum.  Probably the biggest issue of separate tables is pulling threadfield data on the search/portal page - since this could be pulling data from all forums at once, you're going to end up with a very ugly long series of joins.
These problems can probably be worked around, but probably require significant redesign in some parts.  It would probably need to introduce the idea of "forum groups" and you assign each forum to a group (which maps to a table).  Alternatively, one may just create a separate table for each forum, but that itself may be considered fairly redundant.  The advantages of this would be natural partitioning (rather than explicitly using MySQL table partitioning) and fewer redundant data, but the problem would be very ugly handling of search, and much more complicated, and sometimes problematic, handling routines overall (eg handle cases when admin decides to assign the forum to a different group -> shift data over the place; move thread = shuffle data around different tables (also potentially causing data loss); delete a bunch of threads = you've got to track which forum they're from and which tables to delete from etc).

Only real disadvantages with keeping it all in one table is the amount of redundant empty cells, and perhaps semantics, if that really matters to you.  IMO, storage is relatively cheap these days and blank cells take up very little space anyway, so this disadvantage really isn't significant.

XThreads will never be able to match the speed and flexibility of a well written dedicated script, but it can come very close (ie negligible difference) in a number of circumstances (and in fact, be better in others).  That's the price you pay for flexibility really.
However, the pretense is that we're comparing against a well written script.  Most, for MyBB, I've seen aren't, so XThreads will probably be better than them anyway.

My Blog
(This post was last modified: 04-14-2011 09:49 AM by ZiNgA BuRgA.)
04-14-2011 09:43 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #12
RE: Custom Thread Fields >> Custom Tables?
(04-14-2011 09:43 AM)ZiNgA BuRgA Wrote:  It would probably need to introduce the idea of "forum groups" and you assign each forum to a group (which maps to a table).  Alternatively, one may just create a separate table for each forum, but that itself may be considered fairly redundant.

Wow. The same as XThreads, I never thought that this kinds of tools is possible to be created for MyBB before Oops

04-15-2011 07:48 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #13
RE: Custom Thread Fields >> Custom Tables?
(04-15-2011 07:48 AM)RateU Wrote:  Wow. The same as XThreads, I never thought that this kinds of tools is possible to be created for MyBB before Oops
Hmm, am I missing something - cause it doesn't seem anything too out of the ordinary :/

My Blog
04-15-2011 08:38 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #14
RE: Custom Thread Fields >> Custom Tables?
XThreads? It already made me 'crazy'. Filtering system, has an ability to use conditional in almost all of part of input/output, template prefix, language prefix, and etc......
Really, it already made me crazy Biggrin

Forum groups? Each group of forums has each own 'dedicated' table? Input, Output and Custom Fields like XThreads? Whoa... it's out of 'my ordinary', Yumi (although I don't know what is the real usage for this. Probably because I never use a real CMS before?).

04-16-2011 06:56 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #15
RE: Custom Thread Fields >> Custom Tables?
I don't think the forum table itself would be replaced, only a separate threadfields_data table for each forum.
I think it's possible, but I'm not going to do it...

My Blog
04-16-2011 09:39 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #16
RE: Custom Thread Fields >> Custom Tables?
Yes, Yumi. Personally (it is only my personal opinion), 64 KB row size limit is more than enough (for me) to hold a bunch of custom thread fields in one table.

04-17-2011 02:13 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: