I have been trying for a long time to get SQL Server Express on my computer to practice my C#/SQL with and I still haven't gotten it to work.
Are there other programs I can use to setup an SQL database to practice with? If so, which are the best ones for Vista?
EDIT:
To be clear I am not new to SQL programming, I just haven't done any in a while and want to stay fresh. So I would like something that has most of the features of forms of SQL I would use professionally.
MySQL or Postgresql are both full fledged DB's and good for education/experimentation. You can also check out Oracles free version.
SQLite is good if you need something fast, small and powerful... its a fast download also.
SQLite
SQLite with C#
What aren't you getting to work for Sql Express. It works on Vista. I use it on a daily basis. It no longer comes standard with a "northwind" database, but you an download the AdventureWorks DB. Can you be more specific about "I still haven't gotten it to work"?
I've also heard good things about firebird
Although I still believe that C# and SQL Express is the best way to go.
SQL Server Express generally should be the natural choice for practice with .NET and C#.
If you have no prior experience in working with SQL Server and its Express version one most confusing thing is that SQL Server Express is not installed as default instance, but as SQLEXPRESS instance. So you have to use "Data Source=.\SQLEXPRESS" in your connection string.
In case you can not overcome issues with SQL Express you can try Postgres, but you will need to download and use .NET Data Provider for Postgres.
I preferr Firebird its a madure BD and its O.S. very stable btw.
http://www.firebirdsql.org/
and try ibexpert for manager this bd.
http://ibexpert.net/ibe/
Both Oracle and IBM offer offer versions of their flagship databases for free in a similar manner to SQL Server Express. Both are excellent products if you wish to play with a 'real' database system.
Oracle 10g Express
IBM DB2 Express
Postgres is also well worth considering as it is also a 'real' relational database, having originally started as the much respected Ingres RDBMS in the 1980s. However Postgress until recently was Unix-based and I've never found it particularly reliable installing on Windows.
Personally I would not recommend MySQL for your scenario - although the latest edition can finally be described as a RDBMS having evolved from what really was a collection of flat files with a limited SQL query interface it's peculiarities probably mitigate against it's use as a learning tool unless you are actually focused on MySQL.
There are a number of other less popular RDMSs you could consider. Firebird has always been something of a favourite of mine as I used to code a lot of Delphi, and SQLite is a joy to work with in many circumstances. It's also a pity you cannot use SQL Server Express as the SQL Server product range is simply the most solid product Microsoft produces and usually my database of choice on anything but the smallest, largest or most unsual installations
Vista DB is quite a nice lightweight managed flatfile database (not related to Windows Vista).
For something very simple look at sqlite It supports most SQL syntax and stores it's database in a single file so has very little setup. You'll need an ado.net data provider for it which you can find here Although it isn't a good choice for multi user systems with lots of data it should be fine for an introduction to database programming.
Related
I am working on WPF application, and now I have to choose which database to use. It will be local database.
I am thinking about SQLite, but I am not sure. I am not sure how much data my database will contain, maybe a lot, it depends on users use of application. In that case maybe SQLite is not good solution.
Maybe it is best solution to get use Microsoft SQL Server Express.
I would choose the MSSQL Express Edition because its the most well intergrated with .Net. And if you need to upgrade to Standard Edition its fully compatible you just upgrade it without change anything.
I recommend Microsoft SQL Server Compact Edition.
If you want to go with open source databases to cut down the cost MySQL is the ideal solution. it's competent to the MSSQL Server and one of the top most open source databases.
i have just started using visual studio 2008.I am working on c#.
I want to add SQL database particularly LOCAL database (.sdf) to my project and want to use queries which will save data in database and fetch some data from database and which will display and will perform different function.
So, if any body can give me any small tutorial or link that what are various types of databases i can use along with visual studio and and how will i be able to use it.
Any general tutorial will do.
Thanks a lot.
Regards,
Don't use .sdf databases.
I've worked with it but it was confusing. I was not able to use WHERE statements....
Use SQLite instead.
That is THE Solution.
Download SQLite here
Another tutorial
I recommend you the use of SQLite
Not sure why Gergen was unable to perform where statements. One issue I had with Compact edition was that I couldn't create stored procs or views. I don't have much experience with SQL Lite, so I can't give an opinion on that.
If you are doing web based stuff (i.e., asp.net), I found the following series a good introduction to database stuff: Data Access Tutorials
As for what database to use, as long as there's a provider for it, working with it via ADO.NET (or entity framework, or whatever) should be similar. If you are just starting, I'd probably recommend staying with the Compact Edition since most examples/tutorials you'll see will involved SQL Server.
For simple Local SQL database stores, there are quite a few solutions. A good full comparison can be found on from Wikipedia
SQL Express 2008
Out of process, runs as a windows service, supports stored procedures and views and does pretty much everything SQL standard does with few limitations. 50MB install.
Ideal for anything but large SQL deployments.
Loads of how to guides for SQL Express
SQL Compact Edition 3.5 (.sdf files)
In process, the code for accessing the database runs within the same process as your application. Ideal for embedded systems (point of sale, ATM, in-car systems etc...). Microsoft's equivilent to SQLite. Very small install (easy to deploy with app).
Getting started guide for SQL Compact Edition and a load of HowTos to get you going
SQLite
The non-Microsoft answer to an in process database. Pretty much the same functionality as SQL Compact Edition apart from it's a smaller install (300kb for SQLite vs. 2MB for SQL Compact edition), it supports larger database files (32TB for SQLite vs. 4GB for SQL Compact edition).
SQLite getting started article
Connecting to Microsoft SQL Server 2008 from Microsoft Visual Studio 2005 and 2008
http://msdn.microsoft.com/en-us/library/s4yys16a(VS.71).aspx
I've never built anything using SQL Lite so I can't say much for it. I have, however, built several commercial applications using Compact Edition and haven't had any serious issues.
You can't batch commands with CE and the syntax is the same as Sql Server (with many missing features, but the most commonly used features are there and I've never had a problem without a work around of some sort).
I've really only used it as an "offline" database in an application for a company that dispatches repair technicians. The applications run on netbooks and download their data from a MySql database whenever mobile connectivity is available so they still have access to their work when they have no mobile coverage.
Due to it being so similar to SQL Server, Compact Edition would probably be an easier starting point. Since you're using a local database file you probably won't hit the 4GB limit (with very little pruning my mobile databases rarely exceed 20MB) - and if you ARE hitting that limit you may want to consider using a service based database (like Express) instead.
I need a lightweight database engine for a desktop application. The application is not data centric, although it needs some persistent data. Which one would you use MS SQL Server express edition or SQLite?
EDIT
Is SQL Server Compact edition free? If it is the case, what about SQLite vs SQL Server Compact edition to develop this kind of application?
Definitely NOT Sql Server Express. That's a server class engine. You want an in-process engine. In that regard, SQLite is fine. So is Sql Server Compact Edition. Both are free and either should be adequate for your needs.
If you're working with C# and Visual Studio simply right-click on your project and select "Add Item..." and in the dialog select the "Local database", this will create a SQL CE (Compact Edition) database. It's got most of the functionality of SQL Express/Server as far as tables, data types, views but doesn't allow stored procs. It also works with Linq-to-SQL so it's a snap to integrate.
Go with SQL Server Compact - you get to use LINQ that way, which itself is worth the effort.
While SQLite is an option, you'll need to get an ORM layer, and the performance gain will be minimal / non-existent compared to SQL Server.
Firebird is a well known database and support the latest Microsoft framework
SQLite, especially if it's single-user. One data file and one DLL.
If its a single user system you want to look at MS SQL Server compact edition not Express (see here: http://www.microsoft.com/sqlserver/2008/en/us/compact.aspx )
Compact Edition is an embedable database similar to SQLite.
Unfortunately I can't make a recommendation either way.
What about MS SQL Server Compact?
Some love for one of the up and comers in the .NET embedded db world -- VistaDb. The license is a bit more restrictive than Sql Server Compact (free to single developers only), but its a 100% managed DB with xcopy deployment and has VS tool integration.
Be aware that if you use SQL CE along with EF, you will have to generate your own id key, because SQL CE does not support multiple query.
i.e:
insert -> select key for the entity -> not good
generate and id key (GUID or something else) add it to your entity and then insert -> good
Defo SQL lite, although it has some restrictions/features that you should be aware of
if your need is data centric, what you really need is a file, if you need transaction (ACID) then your need is (rdbms) database.
Otherwise you'll have issues when up scaling.
If it's not a lot of data, and you don't need to run complicated queries (although LINQ can), why not use an XML Dataset? That way it's platform independent (could run on Linux with Mono) and doesn't require the user to install extra resource hogging software.
I use XML Datasets extensively for applications that require persistent data storage of small amounts of information. If it's only a few variables, you can also use a settings file, and it will be stored either per application or per user depending on your choices.
Think about overhead for your end users ... SQL Server Express still takes up resources, takes time to start up on a reboot and so on. For a small amount of single-user persistent data I would go with SQLite. Unless you're doing serious binding and so on you won't need an ORM between you and it.
With the economy the way it is my team and I have been looking into using MYSQL to reduce our licensing costs. I am wondering if there are any gotchas or issues that may crop up.
Is there anything we need ot do special to get .NET to talk to mysql as opposed to MsSQL?
When developing for it will LINQ to SQL have issues?
Any caveats we should be aware of?
Not a direct answer, but if you are familiar with SQL Server, then consider SQL Server Express (2005 or 2008). It is also free, and you'll be familiar with it, thus not requiring research into mySQL ;)
That said, check this out: http://dev.mysql.com/tech-resources/articles/dotnet/index.html
You'll need the MySQL Connector for .NET, if you don't already have it, in order to get your .NET application talking to MySQL.
Then you'll have access to MySqlConnection, MySqlCommand, MySqlDataReader objects etc.
LINQ to SQL is for SQL Server only, but there are third-party LINQ providers for MySQL - here's one that looks promising, although I haven't used it myself.
one big one is the support you can get when working with MYSQL if you dont pay the license.
Microsoft hasnt develop yet LINQ to MYSQL support, it maybe some projects out there but they are not guranteed
Here is a post which shows the matrices of the comparison. The database feature section is worth to look at.
http://swik.net/MySQL/MySQL+vs+MS+SQL+Server
Well, I say you're doing the right thing moving to MySQL. SQL Server's licensing cost is prohibitive and since MySQL does the job free and has no limitations like the Express edition I think using it as a backend is a solid idea.
I've used SQL Server express for more than a year now and what irks me most is that it under-uilizes the server's resources so you're not getting enough bang for the buck with express edition. If you have a website with plenty of data or one that gets plenty of visitors then you'll quickly outgrow SQL Server express, and then you'll find that you either have to somehow win a lottery to get the money for the full edition or re-write all your queries for a cheaper DB.
So better plan ahead, go with a cheap DB in the backend. MySQL is a very good choice.
You could just ignore the database being used an opt to use an ORM. That way you won't have to care what database you're using, and move between them (atleast in theory), effortlessly.
Try SQLite. I've used it and really enjoy it. There's even a free admin tool that has AutoComplete (wow). It's suitable for any site that has less than 100k page views per day. There are some downsides to be sure, but the light footprint and compatiblity with LINQ (via DBLinq, which is still in Alpha but I've used it just fine) make it a win in my book.
Be aware that the MyISAM engine doesn't support transactions, whereas InnoDB does.
I'm going to be writing a Windows application using the .NET framework and C#. The application will need to store relational data which will be queried, joined and processed.
Previously I've done this using SQL Server, but that is a total overkill for the application I am now making.
What's the simplest, easiest way to store relational data in my application? If I was on a Mac, I'd be using SQLite. What's the .NET equivalent?
If you are using VS 2008 and .NET 3.5, you can use SQL Server Compact Edition. It's not really a server at all, it runs in-proc with your app and provides a basic SQL database. The databases themselves are a single .sdf file and are deployed with your app. Since it's part of the framework, it also means there's no additional installation. Actually, It's not actually part of the framework, but it's easily redistributable. I'm using SQL Server CE for a personal project I'm currently working on, and it's turned out great so far.
SQL Server Express is what you want. It's free IIRC and easily scales into full-blown SQL Server when required.
Why cant you use SQLite? It works on windows.
SQLite Quick start.
Also see here for getting it to work with .NET http://web.archive.org/web/20100208133236/http://www.mikeduncan.com/sqlite-on-dotnet-in-3-mins/
So you could use SQLite if you wanted to but perhaps as others have pointed out SQL Express is a better option as you can upgrade to a full server if you need to in the future. Although from what you wrote i don't know if that's likely.
Sqlite is definitely the best option for embedded database for application storage.
It is free fast and reliable.
Sql Server Compact Edition (*.sdf files). Small enough for Smartphones but also available on the full platform. The .net 2 version was called Sql Server Mobile.
Here is a comparison between Compact and Express.
I haven't used it yet but if I was making a windows application and needed functionality similar to this I would use the built in windows database that's already on every single box of windows.
http://www.codeplex.com/ManagedEsent
You can use SQL Lite with .NET. In fact, if you are willing to keep your code so it can translate to mono, which encompasses most 2.0 (3.5 still upcoming), you can run your code on the Mac, as well, if you stick with SQL Lite:
http://mono-project.com/Main_Page
It really depends on how much bang you need. SQL Express, which has been mentioned numerous times in this thread, is SQL Server. It has some restrictions over full blown SQL Server, but it is the full SQL Server engine, so it is not a lite version, unless you think restricting a database to 4 GB makes it light. If you need heavier services like some Reporting, some message queueing (service broker), then SQL Express 2008 is your creature.
For lighter in the MS world, you can go with SQL Compact. As with SQL Lite, it is limited in scope, but you stated you need a lightweight database.
If you are really familiar with SQL Lite, I see no reason not to head that direction. Add a factory on top of your database access, just in case you change your mind. Then you will not have to rip up your entire app to switch databases.
Microsoft JET Blue.
If not sqlserver express, You may want to conisder Microsoft SQL Server Desktop Engine ( scaled down version of sqlserver) which is free in most cases. or MySQL which is also free. I'prefer mysql.
SQLite
Firebird
MySQL Embedded
I would say Microsoft Access. You need a licence though ...