Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Just a quick one about database sizes

Author  Topic 

Jay123
Yak Posting Veteran

54 Posts

Posted - 2010-05-09 : 08:18:28
How much data can say a 5mb database hold.

for example If a 5mb db with 1 table can hold 500,000 rows
would this be the same as 2 tables holding 250,000 rows
or does an extra table require more resources. also how
does number of columns affect table size(in mb).


Also. say i specify a table starting at 5mb with maxSize at 20mb
and filegrowth of 2.
if the table reaches 20mb would it stop allowing
data to be enterd, Would i have to keep track and manually make it bigger. (maybe a stored procedure?).

Thanks for taking a look.

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-05-09 : 23:32:39
quote:
Originally posted by Jay123

How much data can say a 5mb database hold.

for example If a 5mb db with 1 table can hold 500,000 rows
would this be the same as 2 tables holding 250,000 rows
or does an extra table require more resources. also how
does number of columns affect table size(in mb).



It depends on number of factors like
No of columns
Datatype of columns
Indexes
and so on..

quote:

Also. say i specify a table starting at 5mb with maxSize at 20mb
and filegrowth of 2.
if the table reaches 20mb would it stop allowing
data to be enterd, Would i have to keep track and manually make it bigger. (maybe a stored procedure?).

Thanks for taking a look.



You cannot sepcify the max size for table but only for the DB. with filegrowth value given , it will increase automatically with specified value unless the Disk space constraint happens.


Regards,
Bohra


I am here to learn from Masters and help new bees in learning.
Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2010-05-10 : 11:44:07
Look up Data Types [SQL Server] in Books Online (BOL). This will give you information on the size of the respective data types. That will allow you to calculate the size the table will hold.

For example, if you had 500,000 rows of a single Integer column (Int is 4 Bytes) that would take a little over 1.9MB to store the data in that column.
Go to Top of Page
   

- Advertisement -