DeathsAlive Posted September 6, 2013 Share Posted September 6, 2013 Been developing with NWE for a little while now. And I have got to say, I really do like the framework/engine. But one thing that I have found, and repeatedly annoyed me. Why do a lot of modules not conform to at least 2nd or 3rd normal form (Normalization) standards (in terms of database design) but also, they reference the players by username and not ID...? And some even store the username in database as the reference point. Please tell me I'm not the only one who finds this rather annoying? Quote Link to comment Share on other sites More sharing options...
Dave Posted September 6, 2013 Share Posted September 6, 2013 Been developing with NWE for a little while now. And I have got to say, I really do like the framework/engine. But one thing that I have found, and repeatedly annoyed me. Why do a lot of modules not conform to at least 2nd or 3rd normal form (Normalization) standards (in terms of database design) but also, they reference the players by username and not ID...? And some even store the username in database as the reference point. Please tell me I'm not the only one who finds this rather annoying? Sounds like poor module design, should ideally be referencing on primary keys, and I doubt the username is a primary key. Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted September 6, 2013 Share Posted September 6, 2013 In the official mods I doubt there is the username as primary key. If you have any example, we could discuss it. For the normalization of the tables, there is a couple of tables which are on purpose not normalize. Example being the polls, and the stats. Stats are fixed (days or month) and keeping them in a non-normalized form you will have better performances while retrieving the data and updating a given entry. For the polls giving 10 different options should suffice, and made me save time as I didn't had to design a special admin panel for it. BTW be careful with full normalization inside tables. Some times allowing a bit more columns may improve the performances and actually use less space. Each time you do a child table, you will need a foreign key and it will require more time for the data retrieval. Sure, don't go to far either as you would end up with tables with 200 columns ;) As always you will need to find a good compromise between the two extreme, and there is no single right solution. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted September 7, 2013 Share Posted September 7, 2013 Maybe I haven't been paying attention but I haven't seen a module reference player by name instead of player id or am I blind or not understanding? Quote Link to comment Share on other sites More sharing options...
DeathsAlive Posted September 7, 2013 Author Share Posted September 7, 2013 Maybe I haven't been paying attention but I haven't seen a module reference player by name instead of player id or am I blind or not understanding? The only one I noted down (without diving into PHPMyAdmin) was "messages" and "sent_to" In the official mods I doubt there is the username as primary key. If you have any example, we could discuss it. For the normalization of the tables, there is a couple of tables which are on purpose not normalize. Example being the polls, and the stats. Stats are fixed (days or month) and keeping them in a non-normalized form you will have better performances while retrieving the data and updating a given entry. For the polls giving 10 different options should suffice, and made me save time as I didn't had to design a special admin panel for it. BTW be careful with full normalization inside tables. Some times allowing a bit more columns may improve the performances and actually use less space. Each time you do a child table, you will need a foreign key and it will require more time for the data retrieval. Sure, don't go to far either as you would end up with tables with 200 columns ;) As always you will need to find a good compromise between the two extreme, and there is no single right solution. The polls one I could live with, that was for high simplicity :) I'm just redesigning and altering the modules to suit my needs. Just makes me "grr" when I see it. Not all official modules. Some are from the market place. Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted September 7, 2013 Share Posted September 7, 2013 The messages sent_to is on purpose, it allows multi-destinations (if implemented), and the reply to all, the link to the user id is "inbox_of" as well as "from_user", therefore as you see, it's really on purpose ;) For the modules written by other authors, I honestly don't remember, and would also not change the way each author write his/her modules. Quote Link to comment Share on other sites More sharing options...
The Coder Posted September 8, 2013 Share Posted September 8, 2013 I don't NWE, personally. But if I was you, experiment with all the engines, Mccodes has alot of bugs and unresolved issues...But there have been some amazing final products associated with it, so try it out. If not, then go with what you like. Quote Link to comment Share on other sites More sharing options...
SRB Posted September 8, 2013 Share Posted September 8, 2013 Sig: User Comments - 5% completed. SCRAPED. Mean "Scrapped", right? Quote Link to comment Share on other sites More sharing options...
Seker Posted September 8, 2013 Share Posted September 8, 2013 Sig: Mean "Scrapped", right? Holy ****, I swear I thought about the same exact comment. XD Quote Link to comment Share on other sites More sharing options...
SRB Posted September 9, 2013 Share Posted September 9, 2013 Great minds and all that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.