A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Best way to add and delete data



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2005, 08:44 PM
Karen
external usenet poster
 
Posts: n/a
Default Best way to add and delete data

I have a log-database where data is added and deleted
based on a timer.

I can specify the size of the log, so when the log
is "full" I delete the oldest record when a new is added.

The adding and deleting makes the database grow untill it
is compacted.

Are there any "good practices" for this kind of procedure?

I thought about not actually adding and deleting - but
just overwrite the oldest record with the new information.
Would that save me space - and how would it affect the
performance?

I know I could just try - but any comments are appreciated.
  #2  
Old January 5th, 2005, 03:04 AM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Tue, 4 Jan 2005 12:44:57 -0800, "Karen"
wrote:

I have a log-database where data is added and deleted
based on a timer.

I can specify the size of the log, so when the log
is "full" I delete the oldest record when a new is added.

The adding and deleting makes the database grow untill it
is compacted.

Are there any "good practices" for this kind of procedure?

I thought about not actually adding and deleting - but
just overwrite the oldest record with the new information.
Would that save me space - and how would it affect the
performance?

I know I could just try - but any comments are appreciated.


Note that this kind of operation is probably NOT appropriate for
Access! Access does NOT free up space when records are deleted or
overwritten; the database continues to grow, with the deleted or
changed records' space being marked "dead" and left unused, and if the
fields are indexed, changes to the indexes will take up space as well.
The space is only recovered when you Compact the database, as you have
seen. Changing from deleting to updating might slow the bloat a bit,
but not much.

You may want to use an old-fashioned flat-file database for this
purpose, or even write C# or VB code to manage the file size yourself.

John W. Vinson[MVP]
  #3  
Old January 5th, 2005, 09:51 AM
Karen
external usenet poster
 
Posts: n/a
Default

can I gradually "free" the space in some way as I go along?

-----Original Message-----
On Tue, 4 Jan 2005 12:44:57 -0800, "Karen"
wrote:

I have a log-database where data is added and deleted
based on a timer.

I can specify the size of the log, so when the log
is "full" I delete the oldest record when a new is added.

The adding and deleting makes the database grow untill

it
is compacted.

Are there any "good practices" for this kind of

procedure?

I thought about not actually adding and deleting - but
just overwrite the oldest record with the new

information.
Would that save me space - and how would it affect the
performance?

I know I could just try - but any comments are

appreciated.

Note that this kind of operation is probably NOT

appropriate for
Access! Access does NOT free up space when records are

deleted or
overwritten; the database continues to grow, with the

deleted or
changed records' space being marked "dead" and left

unused, and if the
fields are indexed, changes to the indexes will take up

space as well.
The space is only recovered when you Compact the

database, as you have
seen. Changing from deleting to updating might slow the

bloat a bit,
but not much.

You may want to use an old-fashioned flat-file database

for this
purpose, or even write C# or VB code to manage the file

size yourself.

John W. Vinson[MVP]
.

  #4  
Old January 5th, 2005, 08:53 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Wed, 5 Jan 2005 01:51:00 -0800, "Karen"
wrote:

can I gradually "free" the space in some way as I go along?


No, only by compacting the entire database.

John W. Vinson[MVP]
 




Thread Tools
Display Modes

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


All times are GMT +1. The time now is 10:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.