voodoochicken Posted February 12, 2008 Share Posted February 12, 2008 hi, when you learn about trees they say they are faster than lists because (for example) search is logarithmic, but when this data is in a hard disk everything changes because the records are written all over the place and the hard disk has to jump from one place to another, looking for all children and stuff. can you direct me to any good articles on how to handle trees in databases?tnx Link to comment Share on other sites More sharing options...
aspnetguy Posted February 14, 2008 Share Posted February 14, 2008 I am not sure what you are asking here. What do you mean by trees and lists. Please be more specific. Link to comment Share on other sites More sharing options...
Synook Posted February 15, 2008 Share Posted February 15, 2008 Databases are relational, they don't use the tree structure. Link to comment Share on other sites More sharing options...
voodoochicken Posted February 18, 2008 Author Share Posted February 18, 2008 I am not sure what you are asking here. What do you mean by trees and lists. Please be more specific.what i am asking here: when you design a database you design it with performance in mind. the operations that require data retrieving mean a larger access time because they are on a hard disk, and every access to a hard disk implies mechanical movement of the hard disk head. there are three kind of movements on the disk, but you care about two: the one where the disk spins and the data can not be read till is below the disk head, the one where the head moves from one cylinder to another. those movements are expensive, because they are mechanical, unlike an access to ram memory, where they occur at the speed of the data bus. if you are reading a file and apply an operation in every data field in linear form, the time it takes is like reading a file sequentially, which is relatively inexpensive. if you are reading a file and have to make lots of random accesses like it occurs in tree operations (where children are not contiguous and are all over the place), in the worst case is like having to wait half a spin and like one third of arm movement for each reading, multiplied by the number of children that are not already in ram. you can change or optimize this with a good database or processes design, now where can i fond good articles on how to handle trees over databases? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 18, 2008 Share Posted February 18, 2008 Those topics are not things that end-users of databases experience or can control. Those are issues that the people who implement the actual RDBMS itself take into consideration, as an application programmer there's nothing you can do to say how or where on disk your data is stored. It doesn't matter if you're using a tree or a linked list or a hash table or whatever. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.