Sunday 23rd of November 2008

Flat files or Database

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ... Posted on: April 3rd, 2008 by admin

One of the worst programming decisions i’ve ever seen was to use 16000+ flat files for currency conversion in a PHP/MYSQL database. When i quizzed the designer about the design their response was that it was fast and databases are slow.

If you believe this then your education was a waste of time or you simply know nothing about databases. How can i say this you ask? Google is a database! Imagine how many pages they have now and how quicky it works. Flat files would not do it.

Databases have enjoyed a lot of development over the years. As a result they are fast and as such you should embrace their technology. Flat files are not the answer, ever! If you are searching for anything, then put the information into a database.

Indexes are a method for improving speed. I recently forgot to add an index to a table and my website went AWOL for about 45 minutes. With the correct indexes in place the query took less that 0.5 seconds. Indexes organise a snapshop of your table so that the database search engine doesent have to read through all the text.

    Related posts

Leave a Reply

You must be logged in to post a comment.

Headlines

Feeds