Welcome Guest, Not a member yet? Register   Sign In
Forum prototype - Constructive criticism requested.
#51

[eluser]TheFuzzy0ne[/eluser]
Hi, Jedd. Welcome back! Thanks for your suggestion. That had occurred to me when I gave the prototype another look over, and I've changed it.

Won't the database be normalized if I store the thread and post counts in another table? I've read about normalization hundreds of times, but I just don't get it.
#52

[eluser]Dam1an[/eluser]
[quote author="TheFuzzy0ne" date="1242150011"]Won't the database be normalized if I store the thread and post counts in another table? I've read about normalization hundreds of times, but I just don't get it.[/quote]

In short... No

The idea of Database normalisation, is that changing something somewhere, means thats change propergates through everywhere.
If you store the post count, and make a change such as delete a post, the value of post_count is now incorrect

Make sense?
#53

[eluser]TheFuzzy0ne[/eluser]
Yes, I understand. Thanks.

Which form of normalization are we talking about here, though?
#54

[eluser]Dam1an[/eluser]
In most cases (unless they say otherwise) a normalised database is in 3rd normal form
It is possible to go beyond 3rd normal form, but you wouldn't do that in a real world case, its purely for academic purposes/proof of theory after that
Differant normal forms
The king of normalization, 3rd Normal Form
#55

[eluser]TheFuzzy0ne[/eluser]
7NF - All of the above, but without any loss in performance. Tongue
#56

[eluser]Dam1an[/eluser]
If you're going to make up your own, at least give it a cool name, like Fuzzy Normal Form Wink
#57

[eluser]TheFuzzy0ne[/eluser]
F1NF - Fuzzy1 Normal Form (noun)

Pronunciation -
[url="http://en.wikipedia.org/wiki/SAMPA_chart_for_English"]SAMPA[/url]: /fvzi: w6n nOSadr).m@l fO:m/

See [url="http://www.synonyms.net/synonym/impossible"]Impossible (noun)[/url]
#58

[eluser]Dam1an[/eluser]
Seems simple enought to pronounce Smile
Now to go implement it Wink
#59

[eluser]davidbehler[/eluser]
Personally I'm quite a fan of normalization as it avoids redundancy and is in general easy to maintain and understand (assuming you choose the rights names for tables and columns) but for the sake of perfomance it's sometimes advisable to have columns that do not comply with the degree of normalization you use (e.g. number of threads in a forum, maybe even the author and the title of the last post in the forum) to avoid additional joins/queries.
#60

[eluser]TheFuzzy0ne[/eluser]
I've been led to believe that with the MyISAM storage engine as MyISAM keeps a record of the row count. I'm not sure if this applies to using a WHERE clause in the query though. It's [url="http://ellislab.com/forums/viewthread/114127/"]currently being discussed in this thread[/url] if anyone is interested.




Theme © iAndrew 2016 - Forum software by © MyBB