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
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Managed .NET Embedded Database

Managed .NET Embedded Database

Scheduled Pinned Locked Moved Database
csharpdatabasesqlitehardwarequestion
5 Posts 3 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.
  • A Offline
    A Offline
    Andrew Shapira
    wrote on last edited by
    #1

    I'm looking for an embedded .NET database that operates completely in managed code. So far the only one I've found is TurboDB.NET (and I am not sure whether that operates completely in managed code). Are there others?

    M 1 Reply Last reply
    0
    • A Andrew Shapira

      I'm looking for an embedded .NET database that operates completely in managed code. So far the only one I've found is TurboDB.NET (and I am not sure whether that operates completely in managed code). Are there others?

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      Why do you care? Is there something that Jet can't do that you need to do? While a wholly-managed application doesn't incur any interop overhead, a P/Invoke call (to a flat API) only has about 10 machine instructions overhead, while a COM Interop call has about 50 machine instructions overhead (source: Managed/Unmanaged Code Interoperability[^]. Some people have reported that ODBC connections from ADO.NET (using System.Data.Odbc classes in Framework 1.1, or Microsoft.Data.Odbc from the download for Framework 1.0) perform better than OLE DB connections. If you're doing anything serious with the database, though, the interop overhead is likely to be swamped by the cost of actually reading and writing to files, and looking up records in indexes. If you need your application to be portable across CLI implementations (and across operating systems) then you will have to consider an alternative. 'Pure managed' code on .NET is far less important than for Java, where performance with unmanaged code is reportedly poor.

      A 1 Reply Last reply
      0
      • M Mike Dimmick

        Why do you care? Is there something that Jet can't do that you need to do? While a wholly-managed application doesn't incur any interop overhead, a P/Invoke call (to a flat API) only has about 10 machine instructions overhead, while a COM Interop call has about 50 machine instructions overhead (source: Managed/Unmanaged Code Interoperability[^]. Some people have reported that ODBC connections from ADO.NET (using System.Data.Odbc classes in Framework 1.1, or Microsoft.Data.Odbc from the download for Framework 1.0) perform better than OLE DB connections. If you're doing anything serious with the database, though, the interop overhead is likely to be swamped by the cost of actually reading and writing to files, and looking up records in indexes. If you need your application to be portable across CLI implementations (and across operating systems) then you will have to consider an alternative. 'Pure managed' code on .NET is far less important than for Java, where performance with unmanaged code is reportedly poor.

        A Offline
        A Offline
        Andrew Shapira
        wrote on last edited by
        #3

        Hi Mike. I am an experienced programmer and am new to databases. Please be nice. Maybe a bit more background about the application will help. I am writing a server application that runs on a dedicated host. I don't need to do complicated SQL queries and I'd be perfectly happy to use a custom API instead of SQL queries. Doing SQL queries may be fine too. The main reasons I have been looking at databases is to get atomic transactions so that the database is always in a consistent state. In my situation recovery is also nice although it's less important than atomic transactions. The ability to access the database from multiple threads would be extremely helpful. Benefits of staying in managed code for this application are type safety, debuggability, and security. Benefits of embedding the database over using a database server are relative ease of deployment and system management. If performance is better using embedding than a database server, that would be another benefit. As you say though, maybe performance will be about the same either way. You mentioned Jet.. Is Jet something that can be used directly from my C# application, or does it have to be used with a higher level package like Access? If it can be used directly, is there somewhere I can read about Jet from a non-propaganda standpoint? I looked around some in Google and found mostly Jet error messages and security bulletins. I have been avoiding Access because my understanding is that Access does not perform well with large databases.

        A 1 Reply Last reply
        0
        • A Andrew Shapira

          Hi Mike. I am an experienced programmer and am new to databases. Please be nice. Maybe a bit more background about the application will help. I am writing a server application that runs on a dedicated host. I don't need to do complicated SQL queries and I'd be perfectly happy to use a custom API instead of SQL queries. Doing SQL queries may be fine too. The main reasons I have been looking at databases is to get atomic transactions so that the database is always in a consistent state. In my situation recovery is also nice although it's less important than atomic transactions. The ability to access the database from multiple threads would be extremely helpful. Benefits of staying in managed code for this application are type safety, debuggability, and security. Benefits of embedding the database over using a database server are relative ease of deployment and system management. If performance is better using embedding than a database server, that would be another benefit. As you say though, maybe performance will be about the same either way. You mentioned Jet.. Is Jet something that can be used directly from my C# application, or does it have to be used with a higher level package like Access? If it can be used directly, is there somewhere I can read about Jet from a non-propaganda standpoint? I looked around some in Google and found mostly Jet error messages and security bulletins. I have been avoiding Access because my understanding is that Access does not perform well with large databases.

          A Offline
          A Offline
          Arjan Einbu
          wrote on last edited by
          #4

          Maybe Bamboo Prevalence can help you. See article here[^] for more info...


          Have a look at my latest article about Object Prevalence with Bamboo Prevalence.

          A 1 Reply Last reply
          0
          • A Arjan Einbu

            Maybe Bamboo Prevalence can help you. See article here[^] for more info...


            Have a look at my latest article about Object Prevalence with Bamboo Prevalence.

            A Offline
            A Offline
            Andrew Shapira
            wrote on last edited by
            #5

            Thanks, that is a good possibility. I had looked into in-RAM databases a bit before, and your note inspired me to look at them some more.

            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