mardi 30 mars 2021

Can I store users' names and their passwords in a file instead of a data-base table?

I am writing a very simple web-service that I am going to run online (as a web page on the Internet). So far, I do not have a need to have a data base behind the service. However, I need to have user's registration (where each user provide a pair: user name, password). So, I need to store these values somewhere and then retrieve them, when needed.

I thought that maybe I can just store them in a txt file. I do not want to star a data base server and to create a table in there and then run SQL queries, for me it is easier just to write those values to a file and then read them from a file.

Is there some drawbacks of this solution? In particular, can I get a problem when two users register in more or less the same time and then two instances of the web server try to write simultaneously into one file.




Aucun commentaire:

Enregistrer un commentaire