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. The Lounge
  3. Best option for a local/standalone database in a desktop project?

Best option for a local/standalone database in a desktop project?

Scheduled Pinned Locked Moved The Lounge
csharpdatabasesqlitewinformsbusiness
36 Posts 28 Posters 25 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.
  • P Prahlad Yeri

    I'm working on a winforms desktop side-project in c#, it's for my internal project management, storing milestones and tasks, client notes, mcq quiz, etc., the idea is to open source it later. I'm considering sqlite for database as it's the typical choice for standalone projects, isn't it? Another option is ms-access which works great but the caveat is that I don't have ms-office installed, I use LibreOffice instead. Is it possible to create and mange access databases (*.mdb) purely with ADO.NET code or do we need MSO installed? If not, what other database would you suggest for this kind of project?

    U Offline
    U Offline
    User 13269747
    wrote on last edited by
    #20

    There is only one answer to the question: "What database does this standalone desktop app need to use", and that answer is SQLite. Any other option is going to require more user management than necessary. If the end-user ever has to ask the question "how to I manage the data for this application" or "how do I install the database for this application", then you have failed the end-user.

    D 1 Reply Last reply
    0
    • P Prahlad Yeri

      I'm working on a winforms desktop side-project in c#, it's for my internal project management, storing milestones and tasks, client notes, mcq quiz, etc., the idea is to open source it later. I'm considering sqlite for database as it's the typical choice for standalone projects, isn't it? Another option is ms-access which works great but the caveat is that I don't have ms-office installed, I use LibreOffice instead. Is it possible to create and mange access databases (*.mdb) purely with ADO.NET code or do we need MSO installed? If not, what other database would you suggest for this kind of project?

      M Offline
      M Offline
      maze3
      wrote on last edited by
      #21

      do you need relational database, or scale of a database engine? if gonna be a few hounded entries, a JSON file, read at runtime, and parsed into plain old objects, might be just as affective. All your linq/queries still work. If not need encrypting of data, then can easily edit said file in a text editor, and transport, backup of file same as any file. but then im the weird type that made a comics list in web page/javascript

      1 Reply Last reply
      0
      • P Prahlad Yeri

        I'm working on a winforms desktop side-project in c#, it's for my internal project management, storing milestones and tasks, client notes, mcq quiz, etc., the idea is to open source it later. I'm considering sqlite for database as it's the typical choice for standalone projects, isn't it? Another option is ms-access which works great but the caveat is that I don't have ms-office installed, I use LibreOffice instead. Is it possible to create and mange access databases (*.mdb) purely with ADO.NET code or do we need MSO installed? If not, what other database would you suggest for this kind of project?

        G Offline
        G Offline
        gervacleto
        wrote on last edited by
        #22

        I have this agenda application with the same characteristics. I am using SQL Server CE which has the same behaviour as SQLite has but being a Microsoft monolithic database, works very close to SQL Server (Thew big Brother) and it is very easy to migrate your data to the last without much effort.

        1 Reply Last reply
        0
        • P Prahlad Yeri

          I'm working on a winforms desktop side-project in c#, it's for my internal project management, storing milestones and tasks, client notes, mcq quiz, etc., the idea is to open source it later. I'm considering sqlite for database as it's the typical choice for standalone projects, isn't it? Another option is ms-access which works great but the caveat is that I don't have ms-office installed, I use LibreOffice instead. Is it possible to create and mange access databases (*.mdb) purely with ADO.NET code or do we need MSO installed? If not, what other database would you suggest for this kind of project?

          T Offline
          T Offline
          Thornik
          wrote on last edited by
          #23

          When you do smth small, it's not necessary to select "small tools". Why not use MS SQL Express? First, it's small too, but power inside is same as "adult database"! Plus it's good experience for commercial development.

          1 Reply Last reply
          0
          • P Prahlad Yeri

            I'm working on a winforms desktop side-project in c#, it's for my internal project management, storing milestones and tasks, client notes, mcq quiz, etc., the idea is to open source it later. I'm considering sqlite for database as it's the typical choice for standalone projects, isn't it? Another option is ms-access which works great but the caveat is that I don't have ms-office installed, I use LibreOffice instead. Is it possible to create and mange access databases (*.mdb) purely with ADO.NET code or do we need MSO installed? If not, what other database would you suggest for this kind of project?

            P Offline
            P Offline
            PaulANorman
            wrote on last edited by
            #24

            If you end up needing a fuller set of SQL features, it is now possible to run MariaDB (MySql equivalent) in a local portable mode, with a session initiated/terminated with a discretionary port, from a shellexecute or simillar. MariaDB.education - Install portable[^]

            Paul

            1 Reply Last reply
            0
            • P Prahlad Yeri

              I'm working on a winforms desktop side-project in c#, it's for my internal project management, storing milestones and tasks, client notes, mcq quiz, etc., the idea is to open source it later. I'm considering sqlite for database as it's the typical choice for standalone projects, isn't it? Another option is ms-access which works great but the caveat is that I don't have ms-office installed, I use LibreOffice instead. Is it possible to create and mange access databases (*.mdb) purely with ADO.NET code or do we need MSO installed? If not, what other database would you suggest for this kind of project?

              M Offline
              M Offline
              Mark Starr
              wrote on last edited by
              #25

              First thing: don’t use Access for anything more than prototyping and local, personal projects. Second, if you do use Access, check their licensing terms. Lastly, if you expect to have multiple users using one central database, don’t use Access. Don’t misundertake me: Access is a great tool for what it is, but it’s definitely not suited for some things.

              Time is the differentiation of eternity devised by man to measure the passage of human events. - Manly P. Hall Mark Just another cog in the wheel

              1 Reply Last reply
              0
              • U User 13269747

                There is only one answer to the question: "What database does this standalone desktop app need to use", and that answer is SQLite. Any other option is going to require more user management than necessary. If the end-user ever has to ask the question "how to I manage the data for this application" or "how do I install the database for this application", then you have failed the end-user.

                D Offline
                D Offline
                Dan Neely
                wrote on last edited by
                #26

                The Local DB version of Sql Express also avoids those problems. It can be installed by the application with no extra interaction with the user.

                Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius

                U 1 Reply Last reply
                0
                • D Dan Neely

                  The Local DB version of Sql Express also avoids those problems. It can be installed by the application with no extra interaction with the user.

                  Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius

                  U Offline
                  U Offline
                  User 13269747
                  wrote on last edited by
                  #27

                  That's an extra step, with an extra point of failure, with extra dependencies, some of which will be updated.[1] Using SQLite removes all of that; can be compiled *into* the application, so the application doesn't have to install anything. [1] I once had an application break when Windows performed an update that changed one of the libraries SQL express used.

                  1 Reply Last reply
                  0
                  • P Prahlad Yeri

                    I'm working on a winforms desktop side-project in c#, it's for my internal project management, storing milestones and tasks, client notes, mcq quiz, etc., the idea is to open source it later. I'm considering sqlite for database as it's the typical choice for standalone projects, isn't it? Another option is ms-access which works great but the caveat is that I don't have ms-office installed, I use LibreOffice instead. Is it possible to create and mange access databases (*.mdb) purely with ADO.NET code or do we need MSO installed? If not, what other database would you suggest for this kind of project?

                    C Offline
                    C Offline
                    Cliff Buckley
                    wrote on last edited by
                    #28

                    Have you considered rolling your own? It really depends on what your project needs are. If you are just storing information and not linking (making relational), then simple serialize/deserialize of JSON files can work very easily and would not have any outside dependencies. If you are needing relational, LocalDB (SQLExpress) would be a solid choice but does come with a size limit. I think its 10GB now. Used to be 4. I would not use Access.

                    P 1 Reply Last reply
                    0
                    • D Davyd McColl

                      I've used 4 databases for standalone desktop work: - Access: tends to get corrupted, you must remember to compact regularly - SqlCE: works ok, but may be missing some of the features you'd like; also doesn't do concurrency at all - Sqlite: powerful, small, embedded - a good choice - Firebird: [Firebird: The true open source database for Windows, Linux, Mac OS X and more](https://firebirdsql.org/) - this is honestly a really big hitter for the "standalone database" requirement. Yes, Firebird can run as a server, but it also can run standalone. Good performance, great SQL compliance, good drivers, etc. I've used 3 of these to maintain a local db which is sync'd up to a master when connectivity allows. Out of all of them, Firebird was hands-down the best, and became what the project eventually used, after starting with SqlCE (and finding concurrency issues) then trying Sqlite (and finding some other issue, which may now be resolved - I _think_ it didn't like multi-process access at the time?), then settling on Firebird, which worked brilliantly.

                      ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

                      E Offline
                      E Offline
                      Ed Kautz
                      wrote on last edited by
                      #29

                      I second Firebird, works great local standalone. Fast, stored procedures, free. FlameRobin is a free admin tool.

                      1 Reply Last reply
                      0
                      • P Prahlad Yeri

                        I'm working on a winforms desktop side-project in c#, it's for my internal project management, storing milestones and tasks, client notes, mcq quiz, etc., the idea is to open source it later. I'm considering sqlite for database as it's the typical choice for standalone projects, isn't it? Another option is ms-access which works great but the caveat is that I don't have ms-office installed, I use LibreOffice instead. Is it possible to create and mange access databases (*.mdb) purely with ADO.NET code or do we need MSO installed? If not, what other database would you suggest for this kind of project?

                        S Offline
                        S Offline
                        Steve Naidamast
                        wrote on last edited by
                        #30

                        There are only two options currently for an embedded, desktop database engine... SQLite, which is the easiest to use with a .NET provider, which is now fully supported by the SQLite Development Group. To manage your SQLite database, get a copy of the free database manager tool for SQLite, "DB Browser". It has everything you need to create and manage your databases. The Firebird Database Engine is your second option, using the embedded mode for the database engine setup. Unlike SQLite, Firebird Embedded provides everything that a standard RDBMS would offer such as stored-procedures. The best database manager for Firebird is IBExpert's Personal Edition, which is freely available. The interface is not as intuitive as "DB Browser" but it provides all of the necessary tools to manage your Firebird databases. Firebird is also a tough database engine to work with as the documentation is not nearly as well defined as for other engines. Nonetheless, it is a very powerful engine and if you want to move your application into a multi-user environment, then you can simply use Firebird Server with literally no change in your desktop database structures.

                        Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com

                        1 Reply Last reply
                        0
                        • C Cliff Buckley

                          Have you considered rolling your own? It really depends on what your project needs are. If you are just storing information and not linking (making relational), then simple serialize/deserialize of JSON files can work very easily and would not have any outside dependencies. If you are needing relational, LocalDB (SQLExpress) would be a solid choice but does come with a size limit. I think its 10GB now. Used to be 4. I would not use Access.

                          P Offline
                          P Offline
                          Prahlad Yeri
                          wrote on last edited by
                          #31

                          Yep, I considered lighter file formats for storage such as XML and JSON. What I've read so far suggests that appending specific data chunks to these files become heavier as the data increases. And considering that this method needs pulling of entire file to memory, it might get slower over time as the DB size approaches several hundred MBs or even a GB? In contrast, Sqlite driver just performs CRUD operations on the file, so performance might be better?

                          1 Reply Last reply
                          0
                          • P Prahlad Yeri

                            I'm working on a winforms desktop side-project in c#, it's for my internal project management, storing milestones and tasks, client notes, mcq quiz, etc., the idea is to open source it later. I'm considering sqlite for database as it's the typical choice for standalone projects, isn't it? Another option is ms-access which works great but the caveat is that I don't have ms-office installed, I use LibreOffice instead. Is it possible to create and mange access databases (*.mdb) purely with ADO.NET code or do we need MSO installed? If not, what other database would you suggest for this kind of project?

                            B Offline
                            B Offline
                            Bill S
                            wrote on last edited by
                            #32

                            Consider whether MongoDB is a better choice for a more document centric solution.

                            J 1 Reply Last reply
                            0
                            • B Bill S

                              Consider whether MongoDB is a better choice for a more document centric solution.

                              J Offline
                              J Offline
                              jochance
                              wrote on last edited by
                              #33

                              RavenDB also

                              1 Reply Last reply
                              0
                              • P Prahlad Yeri

                                I'm working on a winforms desktop side-project in c#, it's for my internal project management, storing milestones and tasks, client notes, mcq quiz, etc., the idea is to open source it later. I'm considering sqlite for database as it's the typical choice for standalone projects, isn't it? Another option is ms-access which works great but the caveat is that I don't have ms-office installed, I use LibreOffice instead. Is it possible to create and mange access databases (*.mdb) purely with ADO.NET code or do we need MSO installed? If not, what other database would you suggest for this kind of project?

                                K Offline
                                K Offline
                                Kate X257
                                wrote on last edited by
                                #34

                                SQLite, next question. :)

                                1 Reply Last reply
                                0
                                • L Lost User

                                  Sqlite is installed with Windows ... I don't know what would be simpler than that. It's also in the public domain.

                                  "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                                  L Offline
                                  L Offline
                                  Luschan
                                  wrote on last edited by
                                  #35

                                  "Sqlite is installed with Windows" You mean it is included in a normal Windows installation? Which Windows? I didn't have it installed on my computers, as far as I know, on any version of Windows (3.1..10). If you mean that it 'can' be installed in Windows, that's something else. What can't?! Just curious...

                                  1 Reply Last reply
                                  0
                                  • P Prahlad Yeri

                                    I'm working on a winforms desktop side-project in c#, it's for my internal project management, storing milestones and tasks, client notes, mcq quiz, etc., the idea is to open source it later. I'm considering sqlite for database as it's the typical choice for standalone projects, isn't it? Another option is ms-access which works great but the caveat is that I don't have ms-office installed, I use LibreOffice instead. Is it possible to create and mange access databases (*.mdb) purely with ADO.NET code or do we need MSO installed? If not, what other database would you suggest for this kind of project?

                                    M Offline
                                    M Offline
                                    Matt McGuire
                                    wrote on last edited by
                                    #36

                                    if you are looking for portability without having to install software on the host machine and do not need to share the DB with another process, go with SQLite. it works fantastic, most languages have support baked in, and you can still pass structured queries. last I read I think there is a 4TB limit. if the *.mdb gives you something more that SQLite doesn't have, choose that. to be honest I haven't touched an Access db from code in a couple decades, so I'm not all sure what it offers currently. if you are not worried about portability use SQL express, or a no-SQL DB for document storage. both are good, it all depends on what you plan to do with the data.

                                    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