Database Reference
In-Depth Information
There's more...
As I said, the number of tables in a relational database is a good measure of the complexity.
Complexity of what? Well, a complex database might be designed to be deliberately flexible
in order to cover a variety of business situations, or a complex business process might have
a limited portion of its details covered in the database. So, a large number of tables might
reveal a complex business process or maybe just a complex piece of software.
The most distinct major tables I've ever seen in a database is 20,000, not counting partitions,
views, or work tables. That clearly rates as a very complex system.
Number of distinct tables
("entities")
Complexity rating
20,000
Incredibly complex. You're either counting wrong
or you have a big team to manage this
2,000
Complex business database, not many seen
200
Typical modern business database
20
Simple business database
2
Database with a single clear purpose, tightly
designed for performance or some other goal
0
You haven't loaded any data yet...
Of course, you can't always easily tell which tables are entities, so we need to just count the
tables. Some databases use a lot of partitions, or similar tables, so the numbers can grow
beyond that dramatically. I've seen databases with up to 200,000 tables (of any kind). That's
not recommended though, as the database catalog tables then begin to be non-trivially large.
How much disk space does a database use?
For planning or space monitoring, we often need to know how big the database is.
How to do it...
We can do this in the following two ways:
F Look at the size of the files that make up the database server
F Run an SQL request to confirm database size
If you look at the size of the actual files, you'll need to make sure that you include the data
directory and all subdirectories, as well as all other directories that contain tablespaces.
That can be tricky, and it is also difficult to break out all the different pieces.
Search WWH ::




Custom Search