T-sql – the difference between Used and Allocated space

disk-spacet-sql

I am learning Database operations and I have found a couple of resources online that have given me a loose understanding, but I still couldn't explain the difference myself. Explain like I am five please. I want to make sure that I have a solid foundation to expand my knowledge upon.

Best Answer

Think of your database like a bucket.

The ALLOCATED space is how big the bucket is, i.e. how much data it can hold.

The USED space is how much water/data is actually inside the bucket.

When the water gets to the top of the bucket, you need to make the bucket bigger by allocating more space.