Spanned/Unspanned records – For example, if one block is of size 10 bytes and we have records of size 3 bytes each. Then each block can contain only 3 records. 3 * 3 = 9 bytes.
For unspanned records, bfr = floor (B/R). Number of blocks required = ceiling (r/bfr) where r is the number of records in the table. Hence, bfr is 5 and the number of blocks is 2000.
For spanned records, bfr = ceiling (B/R) where B is the block size and R is the record size. For unspanned records, bfr = floor (B/R). Number of blocks required = ceiling (r/bfr) where r is the number of records in the table. Hence, bfr is 5 and the number of blocks is 2000.
In simple terms the formula to convert from 512 byte blocks to megabytes is:
Enter the number of 512 byte blocks below and the sizes in Megabytes and Gigabytes will be displayed.
Any file between 1 and 512 bytes is going to take up one 512-byte block, if that is the minimum allocation size on the disk, just like a 513-byte file will take two 512-byte blocks. The block count is not rounded down to the nearest integer.
see what is the reason behind, why we use 512 bytes; let us say a file of size 513 bytes,than what happens is in order to store this file we need 2 blocks of size 512 bytes on the hard disk. In order to save the 513th byte we have to allocate a complete hard disk block which is containing 512 bytes right.So there is a wastage of 511 bytes because of internal fragmentation, so in order to reduce this internal fragmentation it is always better that you keep the size of block as small as possible and by experimentation we found out that 512 bytes is the size which is optimal, if you decrease it then you might have to access a lot of blocks in order to access a file and it will take time. So in order to optimize the things they found out that experimentally that 512 bytes is the better size in order to increase the efficiency and decrease the wastage of memory.
Making statements based on opinion; back them up with references or personal experience.