database file doesn't increase in size

17 views
Skip to first unread message

heni yemun

unread,
Aug 24, 2012, 2:46:53 AM8/24/12
to django...@googlegroups.com
Hi,
When i create a user account, fill the fields with some value and save() it in the database file myfile.db for example, the file doesn't show any change in size. So how do i know if i'm actually saving it and can later access the values?  Or is there another problem i should deal with first? THANK YOU!!

Melvyn Sopacua

unread,
Aug 24, 2012, 6:13:53 AM8/24/12
to django...@googlegroups.com
On 24-8-2012 8:46, heni yemun wrote:

> When i create a user account, fill the fields with some value and save() it
> in the database file *myfile.db* for example, the file doesn't show any
> change in size. So how do i know if i'm actually saving it and can later
> access the values?

Because save complains loudly if it didn't work. It's kind of like
crossing the street: if you make it without feeling pain, you can be
sure you weren't hit by a car. There's no need to check your clothes for
any evidence of the contrary.

The reason database files do not grow in size on every new record is
because some space is pre-allocated and space previously occupied by
deleted records is reused if it fits to prevent large holes (meaning
more seeks).
--
Melvyn Sopacua
Reply all
Reply to author
Forward
0 new messages