This week, I learned about b-trees, why they are used in database and file systems, and how to work with b-trees in a simple database implentation using Python.
B-trees are used widely in databases and file systems because they offer O(log n) run times for read and write operations. Because b-trees are always balanced and maintain a constant height, it takes few read and write operations to access or write data to a disk. I find it especially interesting how b-trees are like a combination of a linked list and a binary tree, albeit with special properties, and I can see how they are used in modern file systems due to their performance.
I also learned about how space is managed within a database system using pointers vs. occurrence tables with primary and secondary keys, and how pointers are faster in terms of runtime yet prone to memory errors and unintended read/write operations that can compromise data, versus indexed tables with primary and secondary keys which are harder to implement and require more resources, but at the same time can process data directly and are somewhat more user-friendly in terms of structure and layout.
I struggled a lot with this week's assignment, and unfortunately I did not get my delete function working quite as intended in the Index and UniqueIndex class. I'm planning to redo my code and look over where I went wrong in order to improve my skills and learn from my mistakes.
B-trees are used widely in databases and file systems because they offer O(log n) run times for read and write operations. Because b-trees are always balanced and maintain a constant height, it takes few read and write operations to access or write data to a disk. I find it especially interesting how b-trees are like a combination of a linked list and a binary tree, albeit with special properties, and I can see how they are used in modern file systems due to their performance.
I also learned about how space is managed within a database system using pointers vs. occurrence tables with primary and secondary keys, and how pointers are faster in terms of runtime yet prone to memory errors and unintended read/write operations that can compromise data, versus indexed tables with primary and secondary keys which are harder to implement and require more resources, but at the same time can process data directly and are somewhat more user-friendly in terms of structure and layout.
I struggled a lot with this week's assignment, and unfortunately I did not get my delete function working quite as intended in the Index and UniqueIndex class. I'm planning to redo my code and look over where I went wrong in order to improve my skills and learn from my mistakes.
Comments
Post a Comment