I am building up a point of sale application using C# object oriented programming. What is the best way to save large amount of data (like 5000 or more) that would be small in size but mainly it will be fast to load the data. I was thinking to use XML or SOAP serialization to save the data? What do you think I should use to have performance?
Thanks in advance
Loading
VulpesPosted Apr 12, 2013, 11:25 AM
CSV files are very fast to read/write and reasonably compact but a fair amount of code is needed to convert your objects to and from text format. However, they are of course highly portable.
Relational databases are relatively slow and not particularly compact but score heavily when complex queries need to be performed on the server. They easily map to DataSet and DataTable objects in .NET.
However, if the data is held in custom objects, then the beauty of serialization is that you can save the objects to disk or to a transmission medium and then reconstitute them with very little code. Binary serialization formats are compact but not very portable whereas XML formats are rather bloated but highly portable.
So, if speed and compactness are the most important features and you're not bothered about portability or anything else I've mentioned above, then I think the BinaryFormatter is your best option.
Daniel VellaPosted Apr 12, 2013, 11:31 AM
Daniel VellaPosted Apr 12, 2013, 10:58 AM
VulpesPosted Apr 12, 2013, 9:54 AM