
So the size of the database is sum total of size of its individual tables.
Size of the table = Size of its Data + Size of its Indexes.
Size of database = Sum of {Individual Table Size}
Size of database = Sum of {Individual Table Size}
The following script uses that above logic to compute the overall size of the database by computing the size of its individual tables. This can be used to understand why and where the database size is growing.