Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Flat Files! Good Or Bad? Whats Your Opinion!
Flat files!
You cannot see the results of the poll until you have voted. Please login and cast your vote to see the results of this poll.
Total Votes: 5
Guests cannot vote 
KansukeKojima
post Dec 5 2007, 07:31 PM
Post #1


Privileged Member
*********

Group: [HOSTED]
Posts: 525
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



So... whats your opinion on flat-file websites? You know, no databases, everything is stored in txt, php, or html documents...

In my opinion I really like using them. This is mainly because I have yet to learn anything about databases tongue.gif

Post any advantages or disadvantages you think they possess....

I like them because, for me, they are fairly easy to use once created.

A disadvantage in my opinion is that it takes a while to code properly so it functions well.
Go to the top of the page
 
+Quote Post
rvalkass
post Dec 6 2007, 07:47 AM
Post #2


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,055
Joined: 28-May 05
From: Hertfordshire, England
Member No.: 7,593
Spam Patrol



Flat files are only really good for lists, and not a lot else. Like you say, coding them to act as databases, even in a very primitive way, takes time and effort to get right. Personally I would use a database such as SQLite for anything small scale that requires anything more than a list of single word terms to be stored.

Once you learn how to effectively use databases there are all sorts of SQL commands and the like that you can use to simplify a variety of things you would usually have to code manually if you used flat files.
Go to the top of the page
 
+Quote Post
t3jem
post Dec 6 2007, 10:48 PM
Post #3


Privileged Member
*********

Group: [HOSTED]
Posts: 521
Joined: 9-February 07
Member No.: 38,519



When I make my webpages I use a flat file system only because I have no need for a database; however, I did have to create a PHP program to store emails and send period emails out to them. I would have much preferred to use a database system such as mySQL; however, I was not in control of the server and had no idea what was on it other than php and the admin never used mySQL before so I decided to use a flat-file system. So it is good when you can't use a database system; however, I know my code will begin to break down after awhile when the email list becomes too crowded. Flat-file systems are also harmful if you don't secure your code enough and someone decides to inject malicious code into the system and manages to destroy your site with it, but you can even have this problem with a regular database too.

So, like I said before, I would prefer to make a mySQL database, but I have no experience in it so I stick with flat-file systems until I need to move over.
Go to the top of the page
 
+Quote Post
sonesay
post Dec 6 2007, 11:23 PM
Post #4


|||[ n00b King ]|||
*********

Group: [HOSTED]
Posts: 642
Joined: 20-June 07
From: Auckland
Member No.: 45,102



I dont use flat files well files on their own just to hold data. Although I do keep a few arrays stored in a PHP file just to use it may be considered the same thing. There is an advantage here since its in a PHP file there is no wait time for retriving it from a database. If you have static data that seldom changes and is required often by many processes having this setup will be more effect then having them stored in a database.

If on the other hand you have to update it often then flat files are very bad as its much slower to update because the program will have to read each line untill it finds the correct entry then perform the update. If the list gets very long it can be very slow. In this case a database is more effective.
Go to the top of the page
 
+Quote Post
hippiman
post Dec 8 2007, 01:28 AM
Post #5


Premium Member
********

Group: Members
Posts: 150
Joined: 9-April 07
From: Nebraska
Member No.: 41,301



It's a lot better to use a database if there are going to be a lot of people trying to change something at the same time. Like, if mySpace used flat files for everything, it would either end up going really slow, or it would just crash, and have a bunch of errors in all the files, because of people trying to change stuff at the same time. If you use a database, it usually has a built in way to protect against anything like that happening.

Once you learn how to use SQL, it's a lot easier, and more efficient than flat files, unless you're not going to have many people on your site. It mostly depends on traffic, and the type of data you're trying to store.
Go to the top of the page
 
+Quote Post
jlhaslip
post Dec 8 2007, 02:10 AM
Post #6


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,882
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



As noted above, Databases are definitely the right approach to take for many (most) data storage techniques. They handle more users, more data, faster and more securely. No doubt about that. Site membership lists, download lists, and many more applications similar in nature are best handled via a Database Management system.
On the other hand, Flat Files can work quite nicely for applications which are not large, or data intensive, or are static and the security of data is not an issue. Site menus, static lists might be handled by Flat Files where either a Database /system is not available, or is restricted in volume, or if the amount of data is small, so the overhead of a database is not required.
Additionally, Flat Files are a nice, easy way to learn a scripting language without the burden of having to learn the Database System at the same time. Focus on learning the scripting language first and then the DBMS.
Besides, by working with sequential Flat Files first, you will then also know the 'old-fashioned' methods and will appreciate the DBMS more... smile.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Php?(6)
  2. Whats On Your Site?(42)
  3. Whats Your Ideal Site?(8)
  4. What's Your Alexa Rating?(4)
  5. What's On Your Site?(35)
  6. Problems Encountered With Weblog(4)
  7. Session_start()(8)
  8. Whats An Https(4)
  9. Get My Pc Files Accessed Anywhere(4)
  10. Blog(0)
  11. Versus In Fantastico(3)
  12. Corruption Of Zip Files When Downloading(9)
  13. What Forum Software Do You Use And Whats Your Favorite?(13)
  14. Moderator Of A Forum(6)


 



- Lo-Fi Version Time is now: 25th July 2008 - 08:40 PM