Text File vs Database

Author Topic: Text File vs Database  (Read 6189 times)

Offline SeofinderTopic starter

  • Trade Count: (0)
  • Jr. Member
  • **
  • Thank You 0
  • Posts: 53
  • Karma: 2
Text File vs Database
« on: 04-21-2010, 17:29:40 »
I have a database driven website & I want to improve its performance so that pages can load quickly at client side. So i think I can use text files instead of database & I will update text files as well with programming if I will update my database from admin session. It means text file will remain same as database all the time or I will just not use database any more. I will only work with file system. But before doing this I have couple of questions regarding file system vs database system performance.

1. If I read data from text file or XML file instead of database tables, Will it give any positive effect to my website performance ?

2. Like Databases have limited number of connections that number of limited users can access the database at same time.So is there any same type of limitation on accessing text files or XML file which are located on hosting server ?

3. Which type of programming language (server-side programming language such as PHP or client-side programming language such as JAVASCRIPT) will be best to access the text file or XML file (which is located at hosting server) so that it can take maximum performance ?

4. If I will access data from file instead of database then will I able to protect my data from to be copied and what type other hаcking issues may rise ?

Offline Sevam

  • Administrator
  • Trade Count: (0)
  • *****
  • Thank You 67
  • Posts: 357
  • Karma: 11
  • Gender: Male
    • Trust Directory Project
Re: Text File vs Database
« Reply #1 on: 04-21-2010, 17:30:15 »
1. Reading a database is much faster than reading text files or xml files, especially if you have a large number of records.

2. Most databases are good at handling concurrent access, all you need to make sure is that you open a connection when you need to
and close it afterwards.

3. Its best to access your files using a server-side script for security reasons, I think.

4. From what I read here, I think you greatly underestimate the performance of databases.


Related Topics

  Subject / Started by Replies Last post
0 Replies
Last post 09-06-2011, 03:44:27
by Walalayo
0 Replies
Last post 05-22-2013, 10:53:57
by nadim123
1 Replies
Last post 06-23-2015, 00:53:38
by Talukdar
0 Replies
Last post 12-22-2015, 00:15:35
by chinmay.sahoo
0 Replies
Last post 04-02-2016, 04:57:02
by chinmay.sahoo