The fact that records are modified or deleted does not mean that the allocated disk space is automatically released and becomes immediately available for use. The database must periodically be compacted to avoid an excessive waste of disk space. Compaction reduces the size of the database without removing any data; only unused space is reclaimed.
The SQL statement used is: DBCC SHRINKDATABASE for both SQL Server Express LocalDB and SQL Server databases. For more information about this mechanism, see Using Promodag Reports and Microsoft SQL Server.