SQL Server CE 4.0 - sql

I am looking into using SQL Server Ce 4.0 for my personal blog application along with ASP.NET MVC MVC3 and Entity framework CTP 5.
My question is does SQL Server CE 4 have full LINQ support, i.e. all operators and the like ? Does anyone know of any article/study done to test the functionality of SQL Server CE LINQ functionality?

The LINQ features are broadly provided by the SQL client you're using, not the database, and it's up to the client to map the LINQ operations into SQL etc. that the database will understand. It's usually only very simple SQL.
The 'introducing SQL Server CE 4' blog says it supports the Entity Framework, so if you're using the Entity Framework then you should have access to all the usual EF-based LINQ operations.
Are there any in particular you're worried you're not going to get?

Related

SQL Server compact

I'm trying to get data from api and insert them into a SQL Server .sdf database file, but I'm not sure how to do it especially that I'm using Windows forms on Visual Studio 2010
Can someone help me ?
This is a very broad question, however, at a very high level, you will need to open up a connection to the SQL Server Database and use a data access technology such as ADO.NET or EntityFramework to work with the objects in the database.
See the answer in this thread for an example of working with ADO.NET.

Creating MVC 4 data access layer using SQL Server 2000

I am a novice ASP.Net developer/student/intern. Currently, I am in the process of creating my first MVC web app with:
VS 2012 Ultimate C#
SQL Server 2000
My database is on a SQL Server 2000 with no chance of upgrading to >= 2005 in the foreseeable future. Thus preventing me from using EF, which all the books and examples I’ve read so far have used.
I have created a C# SQL helper class for connections, commands etc. that I have used previously as a data access layer for other basic web form applications.
What's the best way to incorporate it into my current MVC DAL?
Also,are there any examples or documentation outlining the basic steps in creating a sound MVC DAL that adheres to MVC best practices while using server 2000 and without EF.?
Any suggestions/guidance would be greatly appreciated.
Thank you,
Todd
Technically speaking, MVC has nothing to do with your DAL. As far as your MVC app is concerned, it shops at the repository layer and does not care what happens in the warehouse (data layer).
Your DAL can be built using ADO.NET. Although this technology is old, its perfectly usable. If you check out http://www.dofactory.com/Default.aspx, you will see an app that is build using multiple DAL technologies. One is for Entity Framework and another is for ADO.Net ... and the cool part is they are BOTH hitting the same database.

Accessing SQL Server 2005 from Silverlight 4?

If i am using Silverlight 4 and WCF to access my SQL Server 2005 DB - is it going to be a problem? Do i have to use SQL Server 2008 /R2 to do that - or will EVERYTHING work the same (i am making sure because irecall reading somewere that SL4 & RIA works only with SQL Server 2008/R2).
P.S
if you have a better way (a more direct way) to access SQL DB without the use of WCf(=RIA) it will be even better.
Because Silverlight is client-side, it uses only WCF to connect to data sources. That means that it really doesn't matter what version of SQL you are using relative to what version of Silverlight you have. The two are not connected directly. This allows Silverlight to do what it does best (display and gather data and do other UI "stuff").
WCF, on the other hand, can use almost any data source you can dream of using. It can pull from MySQL databases, SQL databases of all versions, and basically anything else that it can connect to via code.
RIA is built on top of WCF so there are some limitations on RIA. There is a question that goes through this in some more detail: RIA Services Vs. WCF and Shared Code
So, the simple answer to your question is no, using SQL 2005 will not be a problem and no, there isn't a more direct way to connect Silverlight to your SQL database.

Mango and System.Data

I've been experimenting with Mango's new data libraries (System.Data.Linq) but I've never used Linq to SQL before and all of my existing code is written for SQLite with ADO.NET. Is there any way (via referencing a Silverlight DLL or otherwise, that I can just write the SQL myself or am I forced to use Linq if I want to use SQL Server CE?
The only way to use SQL Server CE on Windows Phone 7 is via Linq.
There is now way to use SQL that you write yourself.

Access vs SqlServer for a Simple Database

I am currently developing a very simple database that tracks people and the company certifications they hold. This db will need to store letters of certification as PDF files. I was asked to develop this in MS Access, but I think it would be better to build it in SQLServer and use Windows Forms to build the interface. This app will need to be accessible from a public location like a share drive.
My question is, would it be better to do this in SQLServer like I think, or am I full of it and my boss is right on the money? Or are we both wrong?
A good alternative to Access which I use a lot is SQL Server Compact (SqlCe). This is a completely different product than SQL Server Express/Standard/etc. It is an in-process database like Access, it does not run as a separate process or service.
It is free
Full ACID support
Supports multiple connections
Full transactional support
Referential integrity (including cascading updates and deletes)
Locking
T-SQL syntax and SQL Server data types (same API as SQL Server)
Small footprint (~2 MB)
Easy deployment (supports ClickOnce, MSI, XCopy, etc)
Database is contained in a single file you can move around
Supports ADO.NET, LINQ to SQL, LINQ to Entities.
This is an extremely difficult question, without an understanding of the scale of the application. In my opinion, I wouldn't touch Access with a 33.5 ft pole.
Benefits of Access:
No dedicated machine necessary
No problems with portability
Benefits of SQL Server
Better SQL compliance
Better management control
Are you planning to store PDF files in the DB? If so, why?
I choose SQL Server.
An application built on SQL Server will be more robust and support more users than one built on MS Access.
An application built on MS Access can be easier to debug because there is a lack of a server, lack of significant multi-user support, and the entire database sits in a single file on disk that is easily copied around.
Given that, in almost every case, I choose SQL Server over MS Access.
Argh, do the world a favour & use SQL server. Express editions are free, and plenty powerfull enough for your requirements. You can even continue to do the form/report/UI design in Access if you so desire, it can hook up to SQL Server very easily and transparently.
Pros of SQL over access: concurrency, scalablity, reliabiliy, less future developers trying to hunt you down and kill you.
I would almost never use access for a db if I could avoid it, now that SQL Express exists.
If I were you I'd go with what some of the others said and use SQL Express:
http://www.microsoft.com/express/sql/default.aspx
You get all the benefits of a true SQL environment FOR FREE! You can even use the SQL Management Studio as well as leverage Reporting Services (if you download the advanced pack). Download link below:
http://www.microsoft.com/express/sql/download/
Which edition of SQL Server 2008 Express is right for you?
SQL Server 2008 Express is available in the following 3 editions (each is available from the Install Wizard):
SQL Server 2008 Express with Tools
SQL Server database engine - create, store, update and retrieve your data
SQL Server Management Studio Basic - visual database management tool for creating, editing and managing databases
SQL Server 2008 Express with Advanced Services
SQL Server database engine - create, store, update and retrieve your data
SQL Server Management Studio Basic - visual database management tool for creating, editing and managing databases
Full-text Search - powerful, high-speed engine for searching text-intensive data
Reporting Services - integrated report creation and design environment to create reports
SQL Server 2008 Express (Runtime Only)
SQL Server database engine - create, store, update and retrieve your data
SQL Server 2008 Management Studio Express (SSMSE)
Free, easy-to-use graphical management tool for configuring, managing, and administering SQL Server 2008 Express. It can also manage multiple instances of the SQL Server Database Engine created by any edition of SQL Server 2008 including Workgroup, Web, Standard and Enterprise.
Note: This separate download is designed for customers who have previously installed SQL Server 2008 Express (Runtime Only). If you are looking to download SQL Server Express and SSMSE for the first time, please download the SQL Server 2008 Express with Tools from the Install Wizard.
Access, to me, is really a hobbyist tool or for REALLY basic local projects at this point that just hasn't been phased out yet. I'd definitely look to using SQL Express, plus it makes it that much easier to upgrade if you get beyond the 4 GB database barrier in the future.
Go with what you have the best skills in - Access is great for a variety of projects andit can scale really well if you know what you're doing. Conversely, a bad programmer could do an app in Win Forms and SQL Server and produce a badly performing monster.
I personally would go with SQL Express and a Win Forms or ASP.Net front-end as experience shows that these small projects can easily develop over time in to much bigger applications than was originally planned and a well structured database built on SQL Server can scale up more readily to more users if needed.
Hard to say without understand the environment. It could be that all users have Access, but no desktops have .NET Framework (although this would be hard to believe). Maybe all their applications are on Access and that's all the developers and users there know.
Given all that nonsense tho, You ought to use SQL Server Express 2008 and Visual Studio 2008 Express. Hope I don't get you fired. :)
If the application is, as you said, a very simple database, that's what access is precisely for, creating simple databases. You can write both the database and the application forms within the same environment and users won't need to get anything installed.
Be careful though with concurrent access to your application. If you go for the access solution, multiple users won't be able to use the application at the same time. If you want this to happen, you will need the database and the application being apart. This doesn't mean that the DB needs to be SQL server, you can still use Access as your database if you don't require the power of a more complex engine.
EDIT: Just read on a comment that you are planning to have 10 users and less than 1000 records. FORGET about SQL server, you will be wasting your money. No matter if you decide to go for a simple all-access solution or for a distributed web application or desktop app with remote storage, Access is hundreds of times more powerful that what you need. Even for the "toy-ish" engine that access is, you are not using a 1% of it.