I'm coding a website that involves storing very simple data, just a very long list of names with no additional data, on the server. As this data is so simple, I don't really want to use MySQL (it would be a bit too clunky) so I'm asking what's the best way to store very simple data on the server.
I definitely would favour speed over anything else, and easy access to the data via javascript and AJAX would be very good too as the rest of the site is coded in javascript/jQuery. I don't really care if the data can be viewed freely (as it will be available anyway), as long as it can't be changed by unauthorised users.
The most prominent methods of storing data include physical storage devices like tape drives, hard disk drives, solid state drives, USB, CD/DVD and virtual storage medium like cloud. The data is stored exactly in the same manner as it is on the internal storage of your computer. Any data storage device uses the methods depicted in the image below.
The most prominent methods of storing data include physical storage devices like tape drives, hard disk drives, solid state drives, USB, CD/DVD and virtual storage medium like cloud. The data is stored exactly in the same manner as it is on the internal storage of your computer.
Network Storage for Servers multiplies the storage capacity of your data center, protect data, augment backup of large amounts of data and maintaining the data recovery stabilizing the process of recovery even in long run.
The storage system can be based on electromagnetic, optical or other medium depending on its type. The most prominent methods of storing data include physical storage devices like tape drives, hard disk drives, solid state drives, USB, CD/DVD and virtual storage medium like cloud.
There are a lot of things to think about with this.
Personally I find that a database if often a better choice, but otherwise i would use an XML file. Keep in mind though that you have to be careful with loading/reading of XML files to serve web requests to prevent any potential file locking issues.
Use an XML file that is web-accessible. Then you can query the XML file from the browser if need be, and still parse/write it in PHP. You'll want to use the flock function in PHP to make sure that two instances of a page don't try to write to the file at the same time.
Write it to a file and save the data as a serialized object. This way when you read in the data it's instantly accessible as the variable type you need (array, obj, etc). This will be faster than XML parsing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With