There is a question I still do not understand - about the results of realization of the principle of data

Category: Java SE
2013-01-18 02:12:51

Sponsored Links
We usually talk about data structures are implemented in memory. Analogy: binary search, such as my database, there are 10 000 order by a field data, but these data are placed inside the hard drive, originally with binary search, the average length is 10000 ÷ 2 = 5000, but the problem is that the data on the hard disk inside, if you want to achieve binary search, is not put all the data into memory, and then use the in-memory data structure sequence table arrangement transferred from the hard drive out of the 10,000 data? Thus, the light inside the data transferred from the hard disk memory needs to dispatch 10,000 data Moreover, if the amount of data is one hundred thousand, one million, or even more, then how to achieve binary search it? Can not put all the data into memory, right?

Please forgive my ignorance, I really do not understand this has been the problem, the data structure in the practical application of the principle to tell me, or give an example, very grateful.

Sponsored Links

2013-01-18 02:48:51
impression that you said these methods called internal sort, this sort are done in memory of
while the data on the hard disk, you should use an external sort, Data on the structure of the book has also been involved ^ _ ^
2013-01-18 03:10:00
What is the hard drive, if the programs are in the hard drive, how do I read, it should still have to load it into memory. If you use java development process, I find it difficult to achieve without direct manipulation of memory and hard drive, I do not know how, but as to how to read the data into memory, it touches can be efficiently achieved.
2013-01-18 03:43:04
If all read into memory during the search, if one million data, how to do?
2013-01-18 04:21:03
If all read into memory during the search, if one million data, how to do?

course not all read into memory and then row, can be replaced - choose Sort.

recommended to see "data structure" Qinghua, Wu Weimin write, tenth and eleventh chapters latter chapters.
2013-01-18 04:54:33
Oh learn the operating system is more complicated than it has memory paging and paging control
read write their own program can control the number of
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.