Jump to content

Retrieve text from files vs database


7 posts in this topic

Recommended Posts

What I want to do is for a user to be able to search for a log using some sort of a log code. So I can do either:

1. When a user enters the code to search, a hash function would convert the code so that the result would point to the corresponding file and the display page would parse the text in the file.

 

or

 

2. Have the logs in the database, so when the user enters the code to search, the display page would query the database and look for the corresponding log. The database returns the log.

Link to comment
Share on other sites

So you want like a document manager?

 

There are many tools out there for that. but if you want to build it I would think a db would be the best. I think it would be easier to manage as well.

Link to comment
Share on other sites

I have to keep track of 1000 logs and the logs are frequently updated (one entry every minute). Would it be better to write the logs in separate xml files and then retrieve them according to the xml filename or writing the logs to the database is still faster. I'm just afraid that the database entries would be too big.

Link to comment
Share on other sites

  • 2 weeks later...
 Share

×
×
  • Create New...