2011-12-19, 04:40 PM
So can you give us some examples for where the MyBB schema is not up to par according to you? Other than the username in posts tables, which we have found that is used for guest posting.
(2011-12-19, 04:40 PM)pavemen Wrote: [ -> ]So can you give us some examples for where the MyBB schema is not up to par according to you? Other than the username in posts tables, which we have found that is used for guest posting.
(2011-12-19, 07:10 PM)labrocca Wrote: [ -> ](2011-12-19, 04:40 PM)pavemen Wrote: [ -> ]So can you give us some examples for where the MyBB schema is not up to par according to you? Other than the username in posts tables, which we have found that is used for guest posting.
I'd like to know this as well. Where exactly are these inefficiencies?
And I did as much reading up on the subject as I could before posting.
parentlist
attribute in forum
table makes it non-1NF = denormalized databaseforum
tid
and fid
in posts
have a functional dependency, each thread belongs to a forum, from the tid
you can get the fid
fid
attribute in threads
table is enough..ip
or ipaddress
attributes, if you make them all in one table with a unique IPID, it will be easier to check for blocked IP addresses etc...privatemessages
, you have 3 user IDs, fromid
, toid
, and uid
, I don't see the utility of the third one, supposed that a PM is a message between 2 users....tasks
table, there are many attributes than can be collapsed minute
, hour
, day
month
, weekday
, can all be a DATETIME attribute that is more flexible and easily manageableuid
, username
repeated in threads
and posts
, lastposter
, lastposteruid
repeated in threads (suppose you want to change someone's username, run all the necessary queries)...additionalgroups
in users
is a list, same as the first, it's not 1NF and querying such tables is hard...Quote:- rulestype, rulestitle, rules, there's a functional dependency between these 3 elements, they shouldn't be inforum
Utility: rulestype is an independant attribute, separating them will make less redundant information...
Quote:- Endlessly repetitiveip
oripaddress
attributes, if you make them all in one table with a unique IPID, it will be easier to check for blocked IP addresses etc...
Quote:-privatemessages
, you have 3 user IDs,fromid
,toid
, anduid
, I don't see the utility of the third one, supposed that a PM is a message between 2 users....
Quote:- This is not something related to normal forums, but in thetasks
table, there are many attributes than can be collapsedminute
,hour
,day
month
,weekday
, can all be a DATETIME attribute that is more flexible and easily manageable
Quote:-uid
,username
repeated inthreads
andposts
,lastposter
,lastposteruid
repeated in threads (suppose you want to change someone's username, run all the necessary queries)...
Quote:-additionalgroups
inusers
is a list, same as the first, it's not 1NF and querying such tables is hard...
Quote:- regip, lastip, longregip, longlastip, again, badly managed IP addresses...
Quote:Anyway, I'm kinda sure this is not going to be implemented in MyBB 2.0
(2011-12-19, 08:08 PM)TheGarfield Wrote: [ -> ]Examples:
-parentlist
attribute inforum
table makes it non-1NF = denormalized database
Utility: when an attribute is a list, it's hard to make simple queries...
(2011-12-19, 08:08 PM)TheGarfield Wrote: [ -> ]- rulestype, rulestitle, rules, there's a functional dependency between these 3 elements, they shouldn't be inforum
Utility: rulestype is an independant attribute, separating them will make less redundant information...
rules
and ruletitle
are fine in the forums table. ruletype
is hard coded in the code to be a fixed selection. there is no need to remove ruletype
(2011-12-19, 08:08 PM)TheGarfield Wrote: [ -> ]-tid
andfid
inposts
have a functional dependency, each thread belongs to a forum, from thetid
you can get thefid
Utility: Let's say that you want to move any thread to another forum, you'll have to change the fid attribute for all its posts (suppose you have 500,000 posts)... if you delete that, one simple query to change thefid
attribute inthreads
table is enough..
(2011-12-19, 08:08 PM)TheGarfield Wrote: [ -> ]- Endlessly repetitiveip
oripaddress
attributes, if you make them all in one table with a unique IPID, it will be easier to check for blocked IP addresses etc...
(2011-12-19, 08:08 PM)TheGarfield Wrote: [ -> ]-privatemessages
, you have 3 user IDs,fromid
,toid
, anduid
, I don't see the utility of the third one, supposed that a PM is a message between 2 users....
(2011-12-19, 08:08 PM)TheGarfield Wrote: [ -> ]- This is not something related to normal forums, but in thetasks
table, there are many attributes than can be collapsedminute
,hour
,day
month
,weekday
, can all be a DATETIME attribute that is more flexible and easily manageable
(2011-12-19, 08:08 PM)TheGarfield Wrote: [ -> ]-uid
,username
repeated inthreads
andposts
,lastposter
,lastposteruid
repeated in threads (suppose you want to change someone's username, run all the necessary queries)...
-additionalgroups
inusers
is a list, same as the first, it's not 1NF and querying such tables is hard...
(2011-12-19, 08:08 PM)TheGarfield Wrote: [ -> ]- regip, lastip, longregip, longlastip, again, badly managed IP addresses...
I've done a very very quick analysis of the database, there were many attributes that I haven't understood what they mean/refer to, I'm sure there are more than this list...
Anyway, I'm kinda sure this is not going to be implemented in MyBB 2.0, yet I think I've made a decent suggestion, supposed that those organizations who spent many time to find a standardized normalization for databases weren't stupid to make something bad...
(2011-12-19, 09:00 PM)pavemen Wrote: [ -> ]Just because it can be done does not make it practical.