Using Single text file vs Many text files to store data

I am making a Search Engine, which requires Inverted Indexing. Basically it takes a document, separates all the words into array( i wont go into detail, thats as simple as i can explain) . Then associate different terms to each of the word, like NumbersOfThatWord in the document, also keeping TRACK of appearance of that specific word in other documents too.

You might have either understood what i just said or rather completely confused by what i said LOL. The real question however is this:

Since i have to save the complete record of those words(data). I think it might be possible to save them all in 1 text file, however it is easier to save them in separate files and also easy to update them.

Is there any reason i shouldnt store them in separate multiple files? I want to avoid any possible issues that might occur in future.
Not really.
Why don't you use a database? Text files are not easy to search and can be slow when they get big.
There are free databases like SQLite or MySQL.
Last edited on
SQLite is slow.

MySQL is crap.
Thanks for your answers.
I dont know much about using SQL. What i am making is for Project as i am a student :)
Also, i decided to use 2 files , one for storing "words" and second text file for saving its record.

This way it will be easier for me to Search for the word in first file and then easily modify the second text file of records

Again, Thanks a lot :)
Topic archived. No new replies allowed.