Results 1 to 2 of 2

Thread: [2.0] Database Compression

  1. #1

    Thread Starter
    Hyperactive Member drattansingh's Avatar
    Join Date
    Sep 2005
    Posts
    395

    [2.0] Database Compression

    Hi guys. I have a situation that I'm currently trying to figure out ideas about. We have a database here at my work which is not a popular database. The name of the database is 'progress'. Now what is currently done is that for a backup, a batch file runs every night that makes a ZIP file of the entire database that is then copied to a tape. Now there is something about that ZIP file compression that I don't really like. I think there are many loop holes in the backup process.

    So I was thinking about how I could use a programming language to help better the situation. I was wondering if C sharp could be used to write a program to use a much better compression scheme than the ZIP batch backup that is easy to use. Now compared to databases like oracle and sql server, this ZIP backup is kind of lame but at the same time its easy to use since the database itself is small, about 4 Gb in size. For e.g. to restore a backup of the original database, you simply stop the database, copy the entire file from the backup and then re-start. If you need just a few files you could select them from the ZIP backup and add them to the current database.

    Anyone have any ideas on how I could better this situation (and still keep all of the easy to use features of the current process) with the use of c sharp?

    Jennifer

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2.0] Database Compression

    If you're compressing only a single file then GZIP support is built into .NET 2.0. If you're compressing multiple files then you could implement your own TAR support. The TAR format is quite simple and would be easy to implement. Once you've got a TAR file you can use the existing GZIP support to create a tar ball, i.e. TGZ. The drawback with TGZ over ZIP is that to get any one file from the archive you must decompress the whole thing.

    Alternatively you can just stick to ZIP. You can use the ZIP support in J# or you can use a third-party library like #ZipLib. If you check out the VB.NET Codebank forum kleinma (I think) and I have posted on each respectively.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

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



Click Here to Expand Forum to Full Width