Welcome to Dream.In.Code
Getting Help is Easy!

Join 131,587 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,990 people online right now. Registration is fast and FREE... Join Now!




Choosing: SQL Server Compact or Express

 
Reply to this topicStart new topic

Choosing: SQL Server Compact or Express, Answer to when you should use what

jens
post 6 Oct, 2008 - 11:56 PM
Post #1


D.I.C Head

Group Icon
Joined: 9 May, 2008
Posts: 85



Thanked 2 times

Dream Kudos: 150
My Contributions


I just thought I'd share my findings in choosing between SQL server Compact and Express. What are they for, and which one should I use in what scenario.

In short this paper explains that if you need any of:
- Multiple concurrent users
- Stored procedures
- Views
- Triggers
- Procedural T-SQL
- Native XML
...then you should go for the EXPRESS version.

If you do not need any of the above but do need any of:
- Less than 2 MB download size
- Embedding in your application
- To run it on a mobile device (which implies that considerably less resources are used by the compact version compared to the express version when running on a PC)
...then you should go for the COMPACT version.

I'd say that if you're developing a small single user application and don't plan to use any fancy database stuff then the compact version will do the job very nicely. As soon as you start to think "a few users" or "well, this can be more smoothly or elegantly solved if I just use <insert non-trivial database stuff here>" then go for the express version.

Hope this sorts things out for someone more than me. smile.gif

/Jens

PS: I just found a note on a few things that may come in handy if you want to use the compact version.


This post has been edited by jens: 7 Oct, 2008 - 12:35 AM
User is online!Profile CardPM

Go to the top of the page


Jonesta
post 13 Oct, 2008 - 03:45 AM
Post #2


New D.I.C Head

*
Joined: 10 Oct, 2008
Posts: 2

QUOTE(jens @ 7 Oct, 2008 - 12:56 AM) *

I just thought I'd share my findings in choosing between SQL server Compact and Express. What are they for, and which one should I use in what scenario.

In short this paper explains that if you need any of:
- Multiple concurrent users
- Stored procedures
- Views
- Triggers
- Procedural T-SQL
- Native XML
...then you should go for the EXPRESS version.

If you do not need any of the above but do need any of:
- Less than 2 MB download size
- Embedding in your application
- To run it on a mobile device (which implies that considerably less resources are used by the compact version compared to the express version when running on a PC)
...then you should go for the COMPACT version.

I'd say that if you're developing a small single user application and don't plan to use any fancy database stuff then the compact version will do the job very nicely. As soon as you start to think "a few users" or "well, this can be more smoothly or elegantly solved if I just use <insert non-trivial database stuff here>" then go for the express version.

Hope this sorts things out for someone more than me. smile.gif

/Jens

PS: I just found a note on a few things that may come in handy if you want to use the compact version.



Hello ,

Has anyone tried using <BEGIN TRY> in SQL 20054 EXPRESS ?

i cannot get it to work and have reverted back to sql 200 style. Can anyone help?

/jonesta

This post has been edited by Jonesta: 13 Oct, 2008 - 03:46 AM
User is offlineProfile CardPM

Go to the top of the page

jens
post 13 Oct, 2008 - 12:16 PM
Post #3


D.I.C Head

Group Icon
Joined: 9 May, 2008
Posts: 85



Thanked 2 times

Dream Kudos: 150
My Contributions


QUOTE(Jonesta @ 13 Oct, 2008 - 04:45 AM) *

Has anyone tried using <BEGIN TRY> in SQL 20054 EXPRESS ?


I have verified the following code
CODE
begin tran
begin try
select 1/0 infinite
commit tran
end try
begin catch
raiserror('err',16,1)
select @@trancount before
rollback tran
select @@trancount after
end catch

in SQL server 2005 EE and it gives a totally different result than
CODE
select 1/0 infinite

so I'd say it works.

More info here.

Hope this gives a clue.

/Jens
User is online!Profile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/20/08 03:38AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month