View Full Version : What is the best way of saving data?
Korsad
11-17-2003, 02:28 PM
Nowdays, there are so many ways to save data. Maybe even too many. ;)
Which one is the best?
sicarius
11-17-2003, 03:24 PM
There is no "all in one" data solution. It depends on the situation at hand as well as the resources available. If you can't compromise on speed on solution may beat out another, and if you can't compromise on data integrity another solution may be best.
It is really a case by case kind of thing.
stuka
11-19-2003, 05:11 PM
The VERY best way to save data would be to save it on a device that had a hard drive, tape drive, and RAM all in one (and all the same SIZE :O ). That way, you'd always have the data in memory for immediate retrieval, you would be able to get it back quickly after a power loss, and if the disk crashed you could reload IT from the tape! So how much would a 120 GB tape drive, 120 GB HD, and 120 GB of RAM cost? ;)
DNAunion2000
11-19-2003, 09:57 PM
I am not sure I understand the question. Do you mean something like...which is the best method for storing data: a flat file, an XML document, or a relational database?
Korsad
11-20-2003, 04:11 AM
Originally posted by DNAunion2000
I am not sure I understand the question. Do you mean something like...which is the best method for storing data: a flat file, an XML document, or a relational database?
Yes, that's what I mean.
sicarius
11-20-2003, 12:39 PM
Again, it depends on how much data and how you need to access it.
DNAunion2000
11-20-2003, 11:58 PM
I am not sure I understand the question. Do you mean something like...which is the best method for storing data: a flat file, an XML document, or a relational database?
Korsad: Yes, that's what I mean.
Yes, it does depend upon the job (like which tool is the best depends upon exactly what you are doing).
If it is a simple, single-user application, a flat file should be fine.
If the data needs to be stored in some standardized way, and/or you want to be able to validate that the file contents conform to your specification, or it will travel across the Internet, XML may be better. XML is also quite ubiquitous: a plus. But XML documents will bloat quickly if you use elements (instead of attributes) to store data: each "record" has a set of tags with "colum headings" associated with it so if you have 1,000,000 records in the file, each column heading will be repeated 1,000,000 times: quite a waste.
If you need multi-user access, validation of the data's integrity, and you have several related files (customer, order, inventory, suppliers, etc.), then a relational database is the best way to go. Retrieving data is also quite easy using a RDBMS (relational datab ase management system) because they implement a standardized query language, SQL.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.