Since LocalDB is for development purpose, then use what DB for production?
Asked Answered
T

5

10

I'm getting a little confused here between LocalDB and SQL Server Express. I have read from websites that LocalDB is an improved version of SQL Server Express (source). I would assume this implies that LocalDB is replacing SQL Server Express.

The confusing thing, however, is that it was also mentioned on several websites that LocalDB is only for development purposes, and it's not meant for production use.

In this case, I will do my development and testing of my web application with LocalDB on my computer. Since LocalDB is a replacement for SQL Server Express and also not for production use, then what database (other than the full SQL Server if I don't have the money) should I use when I'm ready to publish my application?

Tevere answered 24/4, 2014 at 14:26 Comment(0)
V
11

I would assume this implies that LocalDB is replacing SQL Server Express.

Your assumption is incorrect. Keep reading the article you linked...

LocalDB is not a replacement for SQL Server Express -- it is an addition to SQL Server Express lineup. While LocalDB is meant for developers, the regular SQL Server Express will continue to exist as a free SQL Server edition, fully compatible with and easily upgradeable to higher SQL Server editions.

You would still use SQL Server Express or a higher version of SQL Server for production use. Or better yet, abstract your application from the database in such a way that you could use any server (MySQL, Oracle, etc.)

Vaquero answered 24/4, 2014 at 14:29 Comment(2)
LocalDB can be used in production too (if applicable - the article Carven linked to says this) though it needs to be kept busy to prevent it shutting itself down.Apicella
"it needs to be kept busy to prevent it shutting itself down" ... that doesn't sound like a production database.Trimorphism
W
7

LocalDB is simply a special version of SqlExpress adapted for development usage.

If you're trying to get your tables, views and stored procedures right, you don't need the SqlExpress instance to be running every time you start your machine. You don't need a DB server to accept incoming connections on port 1433 and verify username and password. Etc. etc.

In the past SqlExpress is installed separately. It is not integrated to Visual Studio and ASP.NET. It's like IIS and IIS Express, no one uses IIS Express to host a shopping website, but it's handy to get the codes going in localhost. LocalDB is the same concept, you use a lightweight version of SqlServer that is not optimized for performance, but starts when you need it to get your codes going.

Workbook answered 24/4, 2014 at 14:37 Comment(1)
Thanks for making their differences so easy to understand! +1! :)Tevere
S
1

I've used SqlExpress in production with no problem and many others did so too. As long as you don't hit the limits it's very good and just a small percentage of apps really need more. I'd suggest you develop directly against sql express (localdb didn't even exist until recently, I still develop against sql express) and use it in production until your app becomes very popular or space constraints bite you that you need an upgrade.

Sure you can use other rdbms or even nosql dbs (like ravendb or mongodb), it depends on where you want to host the app or what your experience with a rdbms is etc

Spelt answered 24/4, 2014 at 14:43 Comment(0)
C
0

It depends on hosting and the amount of administration you want to do. As you mentioned, full SQL Server is an option, but licensing costs can be high.

PostgreSQL is another popular choice, works really well, and is free.

My favorite option though is Azure SQL. The pricing is minimal, especially for small databases, it eliminates the need for a lot of administration, and you still get great tooling support with Visual Studio.

Compression answered 24/4, 2014 at 14:31 Comment(0)
T
-3

Neither LocalDB nor SQL Server Express should not be used in production environments, because:

  • SQL Server Express is limited in some ways, eg CPU, memory, database size etc. If you're writing a query,you want to make sure it will run in production on 10 million rows that you can't support locally

  • SQL Server Express has a limitation regarding virtualisation, you can't live migrate it etc.

  • LocalDB places you in "god sandbox".

Full comparison between SQL Server Express and standard is here

I'd recommend using SQL Server Standard or PostgreSQL.

Thurmanthurmann answered 24/4, 2014 at 14:34 Comment(1)
SQL Server Express is perfectly fine for relatively small local databases.Vaquero

© 2022 - 2024 — McMap. All rights reserved.