if we do a stand-alone application without backend database support, we have to read from /write into a file.We have other options ?
if we use a external file, the problem is speed. How we get the better speeed ? one way is to use multi-thread, another way is to load into all data into a build-in collection, such as linked-list, hashtable. this solution problem is , it will take time to load / save data into file.
This is what I am thinking. I want to know, in the real world programming, how to solve the data problem when we don't have backend database support?
By "back-end database" I suppose you mean an enterprise database system like Oracle or MSSql. There's a ton of options. You need to choose the one that fits your particular requirements. I've worked on applications that required full SQL compliance because we were working with large data sets and complex queries. In this case I used MySql in a client-server fashion on the same computer. In another application I needed complex query capability, but the data set was small enough that I felt I could embed the database in the app itself. Cloudscape fit the bill back then, and now it's been contributed to the open-source community by IBM. I've also had my eye on Berkeley DB for use as an embedded DB. It's very popular among GNU utilities. RandomAccessFile can be used to construct an extremely fast embedded database if you don't have a lot of relational data or complex queries. Those options probably just scratch the surface. . .
How much data do you have? I wrote an application without any "database" support, simply using XML. My data set was around 50MB, it wasn't notciably slow. Also, you might be able to add indexing to the XML files to help search and load.