You Are Here:

Community: Developer Discussion Boards

#1 Old reduce the size of database - 2008-12-11, 15:44

Join Date: Nov 2008
Posts: 139
widetech1
Online
Regular Contributor
hi,

I have an application that reads data from a GPS and save a file db.e32dbm (database), but I need to reduce the size of file every 20 seconds, there is some function in the module to do this e32dbm

thanks
Reply With Quote

#2 Old Re: reduce the size of database - 2008-12-11, 16:18

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
Rafael T.
Offline
Forum Nokia Champion
Quote:
Originally Posted by widetech1 View Post
hi,

I have an application that reads data from a GPS and save a file db.e32dbm (database), but I need to reduce the size of file every 20 seconds, there is some function in the module to do this e32dbm

thanks
Well, if you want to reduce file size you must delete items or even clean all your database. For that, you can use some standard dictionary methods, such as __delitem__ or clear. For more information, please check the Python Library Reference page 79


Hope it helps,

Rafael.
Reply With Quote

#3 Old Re: reduce the size of database - 2008-12-11, 17:04

Join Date: Nov 2008
Posts: 139
widetech1
Online
Regular Contributor
hi

Can I know for code file size?

thanks
Reply With Quote

#4 Old Re: reduce the size of database - 2008-12-11, 17:37

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
Quote:
Originally Posted by widetech1 View Post
Can I know for code file size?
Code:
import os

size = os.path.getsize(u"C:\\mydatabase.db")
Also, deleting entries from a database does not automatically reclaim the free space. To compact a database, use:

Code:
mydb.reorganize()
Reply With Quote

#5 Old Re: reduce the size of database - 2008-12-11, 17:43

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
Rafael T.
Offline
Forum Nokia Champion
Quote:
Originally Posted by jethro.fn View Post
Also, deleting entries from a database does not automatically reclaim the free space. To compact a database, use:

Code:
mydb.reorganize()
Yes, yes ... didn't read the Library Reference, just checked the page

Thanks for correcting me, Jussi!



BR,

Rafael.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Database File Size Issue gowthamyemme General Symbian C++ 7 2008-09-02 10:31
Reduce the image size but increase the file size agirllikeyou General Symbian C++ 2 2007-10-30 09:02
Audio Input Stream on N80 tkaihock Symbian Media (Graphics & Sounds) 9 2006-06-30 10:15
How to reduce image size etamburini Mobile Java General 1 2004-06-15 00:26
PNG, how to reduce size? the_professor11 Mobile Java Media (Graphics & Sounds) 4 2004-02-06 14:49

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia