Gerbilkit Posted November 2, 2006 Share Posted November 2, 2006 I am working once again on PHP/MySQL. And I decided to revive my old project of trying to code a blog. Problem is I'm not sure which direction I should go. Previously I stored articles directly in the database in text format. But now I am wondering whether it might be better to create a file to store the articles in and load them into a template with a PHP include statement.Any feedback or advice would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/25884-creating-a-blog/ Share on other sites More sharing options...
tdnxxx444 Posted November 2, 2006 Share Posted November 2, 2006 Storing in database is better from a maintainability and extensiblity standpoint as its easier to add fields and tables later on, as long as you have you have your database properly designed and normalized. Quote Link to comment https://forums.phpfreaks.com/topic/25884-creating-a-blog/#findComment-118240 Share on other sites More sharing options...
Gerbilkit Posted November 2, 2006 Author Share Posted November 2, 2006 It just seemed like it would take up more DB space, which can be limited at times. Oh well I guess I'll keep using this. I'm not the greatest at normalization and the like but I keep learning. :) Quote Link to comment https://forums.phpfreaks.com/topic/25884-creating-a-blog/#findComment-118414 Share on other sites More sharing options...
neylitalo Posted November 2, 2006 Share Posted November 2, 2006 Well, let's put it this way. 50 MB would be extremely small for a database. Let's go mega-ultra-extreme and say that the database has a storage overhead of 10 MB, so you've only got 40 MB of room for storing blogs. The Dilbert blogs I looked at (the only blogs worth reading, IMO) were averaging just under 3000 characters. Just for the fun of it, we'll say your blogs are 4096 characters (a nice round number) and that you're using ASCII and not some funky character encoding. So your blogs are 4 KB apiece. 4 KB / blog, 1024 KB / MB, 40 MB total storage space - it all adds up to 10, 240 blogs. Enough for 28 years of blogging.In summary, use a database. You've got nothing to worry about. Quote Link to comment https://forums.phpfreaks.com/topic/25884-creating-a-blog/#findComment-118427 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.