views:

107

answers:

5

Currently i have no way to test my code with SQL Server. I know nothing about it and have been using SQLite. What should i know while switching? My app is programmed in C# .NET

+5  A: 

To get you started, here are some important things when switching to a enterprise grade networked DB -- from a global-lock embedded in-process db:

  • You need to know about connections failing when doing networked programming, and how to handle such exceptions elegantly.

  • You need to know about connection pooling.

  • you need to know about transactions, since there is no global lock in a enterprise grade enterprise system.

  • You need to know about isolation levels which depend on the type of guarantees a database can give you.

  • You need to learn about SQL extensions -- such as those made by the T-SQL language. These extensions allow you to program complex logic easily.

Hassan Syed
+4  A: 

Why do you say there is "no way" to test your code? If you don't have a server available, you can still use the SQL Server Express Edition free of charge for testing.

http://www.microsoft.com/express/sql/default.aspx

This is assuming your database file isn't larger than 4GB (edit: corrected from 1GB).

SQL Server supports a larger subset of SQL-92 than SQLlite, along with its own language extensions that make up T-SQL, but otherwise I think you'll find it a relatively painless transition.

richardtallent
+1 for SQL Express
GrayWizardx
Actually it is a 4GB limit the last time I checked.
feihtthief
4GB per db, 1GB RAM used per DB, 1 processor used per DB. You can still have as many active DB's as you want on the box.
Paul
+1  A: 

Go to the Erland Sommarskog's site and read everything.

Another vote for SQL Express as well.

dverespey
+2  A: 

Some of they key differences you might encounter depending on which aspect of sqlite you have been suing.

  • SQL Server columns are normally strongly typed. You can not put text data into numeric columns as with Sqlite.
  • SQL Server has support for stored procedures.
  • SQL Server allows you grant permissions to individual objects that allow you to block certain types of access to data or routines by user identity. Sqlite has no concept of permissions.
feihtthief
You mean, Sqlite has no concept of permissions?
tuinstoel
+1. Moving from implicit to explicit data types can be a huge issue.
RickNZ
tuinstoel: Yip. I meant no concept of permission. Thanks. Fixed.
feihtthief
A: 

One logic difference is in tsql primary keys do not auto increase by default. (i may report other difference here)

acidzombie24