Sql Server (Embedded?)



  • So in my day to day life I use Sql Server (2012-2016) and generally speaking, Sql Server is my favorite database platform. I'm aware of Sql Server Compact (4.0) and know that in general it's been discontinued in favor of Sql Server Local DB.

    I generally work with remote DBs that you have full control over in terms of server infrastructure, but here's my question:

    Does Sql Server have anything newer than Sql Server Compact (4.0) for no-install single user database? I haven't played much with local db, does that work as an embedded database when .Net is already installed?

    Yes, I know I could use Sqlite, or mysql portable, or an array of other solutions - but I specifically want to use an embedded Sql Server (syntax) database to minimize differences between a cloud and local solution.

    Assumptions that are safe to make:

    • The user will have local administrator (They can install things if needed, but I don't really want a multi install process. I'd like to have a click-once installer and everything just 'works' for my application - no 'Go install .net 4.6, go install sql server, go install my program, go install...')
    • The folder will be writeable (so local db can safely create a db, insert/update/etc)
    • .Net 4.6 will be installed
    • Application making the calls will be a c# app

    The main focus here is 'No-Install' or 'Transparent Install' to the end user. The user experience is

    • Download my EXE to the folder they want the app installed in
    • Double click
    • Magic. The app starts, is installed with a desktop icon, etc. (Click once installer)

    Also if someone could move this to coding help that would be great. (Why can't I do that myself?)


  • kills Dumbledore

    I tried to use LocalDB for a project once. It worked fine on my dev machine and failed horribly when trying to run on something without full SQL Server installed.

    I never did get to the bottom of what I was missing as the decision was taken to make sure the user had SQL Server Express installed


  • SockDev

    @Matches i think you want this: https://www.nuget.org/packages/sqlite-net/

    Assumptions that are safe to make:

    • The user will have local administrator (They can install things if needed, but I don't really want a multi install process. I'd like to have a click-once installer and everything just 'works' for my application - no 'Go install .net 4.6, go install sql server, go install my program, go install...')

    :fa_check:

    • The folder will be writeable (so local db can safely create a db, insert/update/etc)

    :fa_check:

    .* Net 4.6 will be installed

    :fa_check:

    • Application making the calls will be a c# app

    :fa_check:

    The main focus here is 'No-Install' or 'Transparent Install' to the end user. The user experience is

    • Download my EXE to the folder they want the app installed in
    • Double click
    • Magic. The app starts, is installed with a desktop icon, etc. (Click once installer)

    :fa_check:

    yeah, it's kind of magic like that.

    and best of all you can use linq just the same as local db. :-D

    http://vijayt.com/Post/Using-SQLite-database-in-NET-with-LINQ-to-SQL-

    see?



  • @accalia I've used sqlite plenty, the main reason why I'm currently opting for sql server compact 4 over sqlite is concurrency support. Multiple read/write threads, that sort of thing.

    Sqlite has never played well with multiple readers or writers.



  • I used sql server compact on the project a while back. It did the job, but I don't remember using much of the sql server syntax with it.

    Anyway, it's a shame it's deprecated now. I just sort of assumed it got quetly updated with .NET releases.

    These days, I'd just use sqlite. Even if you find some obscure solution, would you trust your data to it?



  • @cartman82 absolutely do, it's just .net 4 which is still pretty good, and it's not like the underlying code matters much for a database from a user perspective, provided performance is good.

    It was replaced with local db, which supposedly can be installed and deployed in line like compact, but i can't find any decent tutorials on how to deploy the db / create it programmatically. I've made a local db before, connected to it, etc but once it goes out to client machines it has to have additional install steps which i don't want the user to have to deal with.

    Consider that i still know many large banks on sql 2k5 and 2k8, sql server has always stood the test of time well.

    I will be abstracting the process eventually so that it will support sqlite, postgres,mysql, etc but i don't want to start with that when my initial targets will be relatively technology illiterate and won't be until much later when other options are required or even desired. Could likely even get away with just hooking into other systems so i don't need to worry about supporting silent installs.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.