Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Embedded Database

Embedded Database

Scheduled Pinned Locked Moved C#
databasecsharpsql-serversqlitesysadmin
12 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Luther Baker

    I am writing a simple checkbook application. Does the Windows OS provide a simple dbase? I don't want a dependency on Access or SQL Server unless they component I'd be using ships as part of the OS. I could resort to file based storage, but I was hoping some Windows software (IE?) depended on a simple dbase, and said dbase might provide a public interface to my C# application? Articles? Thanks, -Luther

    L Offline
    L Offline
    Luther Baker
    wrote on last edited by
    #3

    I just noticed this post: Re: I should use what provider? Heath Stewart 14:45 4 Jan '04 ... If you need a real RDBMS, look into the Microsoft Data Engine (MSDE) at http://www.microsoft.com/sql/msde/default.asp\[^\] ... I think this post answers my question. I do just want simplistic inserts and selects. Is there another angle? -Luther By the way, how does one post hrefs to this forum? try this

    H 1 Reply Last reply
    0
    • H Heath Stewart

      Actually, a Jet database (.mdb file, which Access uses) doesn't require Microsoft Access at all. It simply uses the Microsoft Jet database engine that should be installed when you install MDAC 2.6 or higher, which is required for ADO.NET anyway. I might be wrong and it might be a separate download (they keep changing all that), but it'll be small and probably already installed because a lot of stuff uses it. That's probably the best database file you could use. With technologies behind it like DDL, you can even create a database from scratch, although shipping a .mdb file with a schema already created would probably be easier (almost like a template from which databases are created). As far as SQL Server / MSDE go, this would be overkill for a simple checkboox application anyway. This is more for hard-pounding applications that need transactional services (not that a register wouldn't necessarily benefit from that), replication, user authentication and security, etc.). Besides, it's a big install and can be the cause of many headaches - especially for computer neophites.

      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

      L Offline
      L Offline
      Luther Baker
      wrote on last edited by
      #4

      What is MDAC? If I want to sell this checkbook application - can I guarantee user's will have MDAC installed, and consequently, the Jet database? If its small and redistributable, I don't mind bundling it - but I'm not sure Mr. John Doe is going to have ADO.NET installed (consequently MDAC and consequently JET) Is an MDAC installation the byproduct of a common application like IE or Office or something. Also - you've described the database, but I'm a neophyte when it comes to connecting to .NET dbases. I am extremely familiar with JDBC. Is there a similar C# API? ODBC wrappers? From your description, I don't even think I have to "start" the Jet Database, I just need to find the set of classes that transparently access JET to read and write mdb files. Is that conceptually correct? I'll google around. Someone's bound to have an example. At least now I have an idea what I am looking for. Thanks, -Luther

      H 1 Reply Last reply
      0
      • L Luther Baker

        What is MDAC? If I want to sell this checkbook application - can I guarantee user's will have MDAC installed, and consequently, the Jet database? If its small and redistributable, I don't mind bundling it - but I'm not sure Mr. John Doe is going to have ADO.NET installed (consequently MDAC and consequently JET) Is an MDAC installation the byproduct of a common application like IE or Office or something. Also - you've described the database, but I'm a neophyte when it comes to connecting to .NET dbases. I am extremely familiar with JDBC. Is there a similar C# API? ODBC wrappers? From your description, I don't even think I have to "start" the Jet Database, I just need to find the set of classes that transparently access JET to read and write mdb files. Is that conceptually correct? I'll google around. Someone's bound to have an example. At least now I have an idea what I am looking for. Thanks, -Luther

        H Offline
        H Offline
        Heath Stewart
        wrote on last edited by
        #5

        See http://www.microsoft.com/data[^]. MDAC is the Microsoft Data Access Components, which include ADO, OLE DB, and ODBC. OLE DB providers are the "database drivers" which ADO.NET uses. Microsoft Jet is indeed a separate download, but is pretty small. See the Downloads section of the page linked above (which redirects, actually). Without MDAC 2.6 or higher installed (MDAC 2.8 is the latest), you cannot use ADO.NET. The Microsoft Jet database engine installs the components necessary to use .mdb files. I'm not sure which one actually installs the Microsoft Jet OLE DB provider, but I'm betting it's the latter one. MDAC will most likely be on the system. Less likely is that Jet will also be installed. Unfortunately, the .NET Framework setup includes neither technology (:wtf:?). These aren't hard to package, though. The site I linked even discuss deployment.

        -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

        L 1 Reply Last reply
        0
        • L Luther Baker

          I just noticed this post: Re: I should use what provider? Heath Stewart 14:45 4 Jan '04 ... If you need a real RDBMS, look into the Microsoft Data Engine (MSDE) at http://www.microsoft.com/sql/msde/default.asp\[^\] ... I think this post answers my question. I do just want simplistic inserts and selects. Is there another angle? -Luther By the way, how does one post hrefs to this forum? try this

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #6

          You don't need a "real" RDBMS for a simple register. Trust me - as someone that has built many installations and consulted both small and large companies on installations, MSDE is not something to be trivialized. Installing it the first time and attaching databases is difficult enough because you have to worry about SQL Server instances and which MSI to use. Maintaining that database through successive installations is a complete nightmare! For the app I designed at my company, we've had to write several utility programs just to update the MSDE installations and then upgrade database changes for both MSDE and SQL Server. Besides, this runs as a service and it can be hefty. It's too much burden on users' systems for something so simple. MSDE is better suided for data mining and analysis, web sites, and other concurrent-access applications. lutherbaker wrote: By the way, how does one post hrefs to this forum? try this As with all web pages, unless you use a relative path or root-relative (absolute) path (which cannot include the hostname), you must include http:// before the hostname. Examples:

          • Document-relative: somedir/file.html
          • Root-relative (absolute): /rootdir/somedir/file.html
          • Fully-qualified: _http://host.domain.tld/rootdir/somedir/file.html_

          -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

          1 Reply Last reply
          0
          • H Heath Stewart

            See http://www.microsoft.com/data[^]. MDAC is the Microsoft Data Access Components, which include ADO, OLE DB, and ODBC. OLE DB providers are the "database drivers" which ADO.NET uses. Microsoft Jet is indeed a separate download, but is pretty small. See the Downloads section of the page linked above (which redirects, actually). Without MDAC 2.6 or higher installed (MDAC 2.8 is the latest), you cannot use ADO.NET. The Microsoft Jet database engine installs the components necessary to use .mdb files. I'm not sure which one actually installs the Microsoft Jet OLE DB provider, but I'm betting it's the latter one. MDAC will most likely be on the system. Less likely is that Jet will also be installed. Unfortunately, the .NET Framework setup includes neither technology (:wtf:?). These aren't hard to package, though. The site I linked even discuss deployment.

            -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

            L Offline
            L Offline
            Luther Baker
            wrote on last edited by
            #7

            There's a whole slew of pertinent information there. Thanks! -Luther

            1 Reply Last reply
            0
            • L Luther Baker

              I am writing a simple checkbook application. Does the Windows OS provide a simple dbase? I don't want a dependency on Access or SQL Server unless they component I'd be using ships as part of the OS. I could resort to file based storage, but I was hoping some Windows software (IE?) depended on a simple dbase, and said dbase might provide a public interface to my C# application? Articles? Thanks, -Luther

              J Offline
              J Offline
              Joel Lucsy
              wrote on last edited by
              #8

              You might want to try SQLite. Look at http://www.sqlite.org and look for the WiKi pages. On there you'll find .NET libraries. I think it would be perfect for the kind of thing you're doing. -- Joel Lucsy

              L 1 Reply Last reply
              0
              • L Luther Baker

                I am writing a simple checkbook application. Does the Windows OS provide a simple dbase? I don't want a dependency on Access or SQL Server unless they component I'd be using ships as part of the OS. I could resort to file based storage, but I was hoping some Windows software (IE?) depended on a simple dbase, and said dbase might provide a public interface to my C# application? Articles? Thanks, -Luther

                H Offline
                H Offline
                henningbenk
                wrote on last edited by
                #9

                Perhaps you could just create a dataset with the tables needed and save/load this as an XML-File.

                L 1 Reply Last reply
                0
                • H henningbenk

                  Perhaps you could just create a dataset with the tables needed and save/load this as an XML-File.

                  L Offline
                  L Offline
                  Luther Baker
                  wrote on last edited by
                  #10

                  Hi, As I mentioned in the original post, "I could resort to file based storage" ... If I could cap the total amout of data - or develop a scheme to incrementally load/search data that exceeded some memory limit. I'm just worried that such a solution will not scale well. Unless I'm reading the entire file into memory, I think this might be a bit slow and I would probably have to implement a searchable object hierarchy. While not the end of the world, thats just not where I want to focus my time right now. SELECT statements are just fine. I've looked at SQLlite (open source file/embedded dbase) and one day, I may implement a small, file dbase - but for now, runtime XML access/storage might not be feasible. I will try to encapsulate the data access anyway. It may make sense to use an XML solution for testing and prototype demonstrations. Thanks, -Luther

                  T 1 Reply Last reply
                  0
                  • J Joel Lucsy

                    You might want to try SQLite. Look at http://www.sqlite.org and look for the WiKi pages. On there you'll find .NET libraries. I think it would be perfect for the kind of thing you're doing. -- Joel Lucsy

                    L Offline
                    L Offline
                    Luther Baker
                    wrote on last edited by
                    #11

                    Actually I have :) I would head that way if MS didn't already natively provide some alternative. I've browsed those docs and one day - I'd like to try my hand at doing something like that in C#. I wish there were more such simple/in-depth projects online. I can't peruse postgresql src without shutting down all communication with the outside world for 1~6 months ;) Thanks, -Luther

                    1 Reply Last reply
                    0
                    • L Luther Baker

                      Hi, As I mentioned in the original post, "I could resort to file based storage" ... If I could cap the total amout of data - or develop a scheme to incrementally load/search data that exceeded some memory limit. I'm just worried that such a solution will not scale well. Unless I'm reading the entire file into memory, I think this might be a bit slow and I would probably have to implement a searchable object hierarchy. While not the end of the world, thats just not where I want to focus my time right now. SELECT statements are just fine. I've looked at SQLlite (open source file/embedded dbase) and one day, I may implement a small, file dbase - but for now, runtime XML access/storage might not be feasible. I will try to encapsulate the data access anyway. It may make sense to use an XML solution for testing and prototype demonstrations. Thanks, -Luther

                      T Offline
                      T Offline
                      TuringTest1
                      wrote on last edited by
                      #12

                      Hey, this is a great thread. If someone were to do an article showing a simple database app in one or multiple flavors (xml, sqllite, jet) that would be a pretty useful article imho. !! :rose: ________________________________________ Gosh, it would be awful pleas'n, to reason out the reason, for things I can't explain. Then perhaps I'd deserve ya, and be even worthy of ya.. if I only had a brain!

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups