Bandwidth Usage Calculation

I understand that bandwidth usage is based on how much data gets sent and received by your web hosting server. But what I want to understand better is how bandwidth usage relates to database use.

For example: if I have a database table of 1 million pages and when a visitor hits my site, the database table is queried to produce a web page. Well the table could be a few megabytes in size, but the rendered web page may be just a few K bytes.

I am thinking that the main impact would be on the CPU and memory limits.

So in terms of bandwidth usage, is it still just a case of how many bytes are sent to/from the browser?