Storage architectures can be classified into two types according to the required access, either directly to file or hard drive. Have a view at both types.
Hard drive access: Known also as block access, this type of access happens when the client requires direct access to the disk. The file system of the client computer manages the access to disks. There are three possible situations:
1.- Internal disk: The client is accessing directly to its internal disk using the internal buses. If it is a personal computer it would likely use ATA or SATA, and if it is a server it would surely use SCSI.
2.- DAS (Direct attached storage): The client accesses a cabinet of hard drive directly connected to the computer.
3.- SAN (Storage Area Network): The client also accesses a cabinet of hard drives and this time it is not directly connected to the computer but is networked.
File access: The client works at the file level, which requests a NAS (Network attached storage) server that manages all the accesses.
In the following figure you can see the four storage architectures discussed:
A RAID (Redundant array of independent disks) or RAID System, is a set of redundant and independent disks. Redundant because they will store duplicated information to ensure fault tolerance and improve availability. And independent, because there is no dependence between them, which allows us to replace any disk in the set with a new one, and it will work perfectly with the disks the array already had.
This type of disk grouping aims to improve the achievable performance with a single disk. Depending on the type of combination we can improve security, storage capacity or data availability. And the RAID controller will ensure that, for the server, this combination of disks appears as one, under the same drive letter.
A hash algorithm transforms the input data to a string of characters of fixed length. The length of the input data can be variable but the result of applying the algorithm is always of fixed length.
In addition, this algorithm has a peculiarity that makes it very useful: it works only in one direction. It is practically impossible to obtain the input data from the output of the algorithm.
The hash algorithm is used when we have an unlimited set of input values and want to get a limited set of result values. Normally, the input values will be strings of variable length characters, which we will convert into strings of fixed length. However, these types of functions support all types of input data. In addition, the results of the function can be delimited to a defined set of characters: integers and alphanumeric.
In the following image you can see the behaviour of a hash function:
Knowing how binary search trees work, let’s study how to work with them. The binary search tree operations that can be performed are: Searching, insertion and deletion of a node.
Searching a node
When we want to retrieve data from our binary search tree structure, we will take advantage of the fact that these structures are ordered. We would start by checking the root node, and if this is the one we are looking for, we are done. If it is not, we would move to your left or right child, depending on whether the data we are looking for is less or greater than that contained in the parent node. And so we would continue until we find the data or finish touring the tree without finding it.
This process is recursive since when we move to a child node, we can consider it as the root node of a new tree. The search process could be expressed as: