What is currently the best solution for WPF applications which are meant to be used on one computer where various users log into them and use them to get/save information locally? Here's how I see the options:
MDF would seem to be the best choice since I assume you can lock it down quite well so that even though users can access the .mdf file, they still couldn't access the data in it except through the application itself. I assume the .MDF file would have to exist separately from the application so would deploy the .exe and the .mdf file. Oh, if you use an .MDF file, does the user need SQL Server installed to use it as is indicated in this stackoverflow question?
I would think SDF wouldn't be recommended since it has quite a bit of limitations and used mainly for mobile storage.
XML might be appropriate if security didn't matter, e.g. a small one-user application to save data that locally that he wouldn't secure anyway, and this file would be easily accessed by other applications/websites on the computer.
SQLite might be a choice but from what I know the APIs for .NET for this database aren't that robust yet, are they?
.mdb Access might be a choice if you needed users to also edit/view the data or generate reports with Access.
there is also IsolatedStorage but I believe this has serious limitations, doesn't it, e.g. not able to access it from other applications?
perhaps using a cloud service might be feasible and quite straight-forward nowadays, would have to investigate
Would appreciate any feedback or ideas.
SQL Server Compact edition is also an option - http://www.microsoft.com/Sqlserver/2005/en/us/compact.aspx
Deployment is pretty easy using ClickOnce or by copying the engine dlls to the application directory.
I would choose SQLite. You can get the ADO.NET Compatible driver here:
System.Data.SQLite
I'd say SQLite. It's incredibly light-weight and easy to use, and the API is fine. You could always use DbLinq as ORM.
SQL Server Compact edition is my choice because of the following benefits:
A small runtime library that you can distribute with your app
Compatible with Linq to Sql (search "SqlMetal.exe")
Integrated design experience with Visual Studio 2008
It's a nice all rounder as a lightweight solution for a .NET app.
http://www.microsoft.com/Sqlserver/2008/en/us/compact.aspx
MDF does seem to be the most flexible solution but user need to have SQL server express installed to use it.
How do you plan on executing CRUD processes? If you are wanting to use Linq to SQL you are kinda limited offically it only supports SQL 2005, Sql 2008 and Sql Compact.
Also, does the application need to be disconnect, partially, fully connected to the internet? That may put some weight on your decision.
IMO, I would start with SQL Server Compact edition and if that was too limiting move to sql server express. (.MDF)
Related
I have a questions regarding databases for ASP.Net 4.0 MVC3 (or 4 Beta).
I'm fairly new to the ASP.net MVC environment, and usage of databases in general.
It's stated that the SQL Server Compact is a local database storage. What does this exactly mean? If I were to use this for my web app, would users be able to "access" this database (e.g. register, login), or would I be the only one with access since the file (.sdf) is "local" and is only in my hard disk?
Let's say I'm coding a library management system which would require storage of alot of stuff in the DB. Would it be better to just use the SQL Server Compact that comes with Visual Studio or should I switch to MySQL or some other databases?
I'm asking because I wanna clear everything up before I step into the world of ASP.Net (and since I'll be dealing with DBs alot in future).
The "local" is relative to where the application code runs, not where the user is. If you're using ASP.NET MVC, the application code runs on the server, to the database has to be on the same server. All users using the web application can use it though since the access is done by the application.
I'd use SQL Server Express for that, version 2008 R2 does have a limit of 10GB per database (not including FILESTREAM data AFAIR) but that is already a lot of data. It's free but uses the same engine as the full SQL Server products, but it has some limitations on database size (as mentioned) and resource usage (parallel processing and memory), for many application it is still a perfect solution though.
No, in this case "local" means that it's contained within the package of the web site itself. You'll want to deploy the database file along with the website (but take care not to overwrite it in future subsequent deployments), of course. But the idea is that the database is a file that you put on the server, not a service installed on the server.
Define "a lot of stuff." I doubt you're going to exceed the capacity of SQL Server Compact, or absolutely require features it doesn't provide. You'll want to compare all of the features available in the various databases. (Size limits, native data types, ease of integration, ease of management and deployment, stored procedures, etc.) Chances are any database will work for you, but you'll have to define your needs in more terms than just "a lot of stuff."
1)
SQL SErver Compact edition is a light weight free, embedded, database engine that enables easy database storage. That means you dont need to install any software in a computer for this database to work. you can simply copy the dll of SQL Server compact edition and put in your bin directory and start using it. No additional setup or security permissions are required for it to run.SQL Server CE Stores database as a files on disk. The file extension will be .sdf You can store SQL CE database files within the \App_Data folder of your ASP.NET Web application
Here is how it looks like in a project.
You can do the same things you did with a standard sql server express instance with SQL CE too. So your users would be able to access the data ( thru your application).
2) SQL Server CE would handle this up to an extend. If you have so much data coming in, you probably want to try something bigger like SQL Server express edition etc.. But the migration is easily doable because it is a miniature version of the real SQL Server Database.
If you are in a shread hosting environment and dont have the ability to install / get access to SQL Server instance, you can go with SQL Server CE as it is file based.
This is a good reading to start with : http://weblogs.asp.net/scottgu/archive/2010/06/30/new-embedded-database-support-with-asp-net.aspx
At the moment I am using Access & an OleDb connection to store data. I went down this route originally because I though that this was the best way for applications that I am distributing to my clients.
I would prefer to use something like SQL Server but is this a good idea for software I am distributing? Does the average Joe's PC have SQL Server pre-installed? If not, I suppose I can provide them with a link to download it for free?
Is there any better alternatives to Access / SQL Server?
You can use SQL Server CE and bundle the database with your application.
See this How to on MSDN.
You haven't really given enough information to answer this specifically but I'll answer generally:
Does the average Joe's PC have SQL Server pre-installed?
No.
If not, I suppose I can provide them with a link to download it for free?
Yes, Microsoft has fairly generous 'free' versions of SQL server Express for small database sizes (<1GB) and small numbers of CPU's (1). Check here.
Are there any better alternatives to Access / SQL Server?
It depends on your app, your skill and how you define better.
If you are running sql-server you can very easily use linq2sql and have strongly typed data base objects that offer clean vb.net code. The linq technologies are worth learning IMO. The tools in VS2010 work well with sql-server databases. Other more modern Microsoft tools are available too that integrate very easily (entity framework and lightswitch (which I don't have experience with)).
For small local databases sqlite works well. If your project is very small and the sql is simple this is a very light weight solution. This is very small and very fast and is used everywhere.
If a server is needed and low cost matters mysqlis a solid open source server though it is now under private ownership.
Again depending upon your application off-site hosting of a database might be a viable solution. I have a client that is still running their db in the cloud with a low cost 2008 SQL Server provider.
I Want Implement a Software by C#.net.I want Use a DataBase Manager Software like Access or SqlLite or etc.My Program Saved Many Data in Local Machine.
I Do Not Want Publish or Move Data to Other Pcs
What DataBase Manager Software Must be Choose?
Not Different DataBase is Free or have a price.
what is the Best DataBase Manager Software to Save many Data in Local Machine?
For sure you are looking for a free database so for that you can use many databases like mysql ,postgresql , and sql server msde or access
but we still have other scenario, if you are going to distribute this application to other pcs so you have to think about deployment and in this case you can eliminate the mysql , postgresql because they depend on servers but msde (it's also server ) is much easier and you can found alot of tutorials how to deploy it with your project
It depends on how much you are expert in database and for what reason you are using it? are you going to need complex queries or it just a storage place for the data ?
if it's complex query i will go for msde for sql server if it's only for saving information may be i will go for access or even xml
Well if you are developing in C# consider using the MSSql Compact Edition. This allows you to create a local database and use it much like SqlLight. However, the support is much better, especially when you using Visual Studio. There you can find it as LocalDatabase under Data when you adding a new item. (Not 100% sure whether it is present on all versions of VS though).
Firefox has an SQLite Manager add-on.
I think the best choice depends on your needs, for example if you must synchronize data with sql server for me the best choise was sql express.
I would vote for SQL Express. You get essentially a scaled down SQL Server that is capable of working with quite a bit of data. SQL Express plays well with Visual Studio and you will be able to take advantage of the System.Data.SqlClient and related namespaces which come with the .NET framework out of the box. They are also better than the Odbc namespaces. Finally, there is a LOT of online support for SQL Express and, as far as I know, SQL Express's flavor of SQL (T-SQL) is the same as that of SQL Server. So should you one day need the flexibility of running with either or (local database, or server database) you will have it. Also, SQL Express is fairly commonly used in the microsoft world so you should be able to find lots of examples, if need by.
TurboDB for .NET from dataweb is a good solution, if you want a powerful engine with stored procedures and professional support from the manufacturer:
http://www.dataweb.de/en/products/dotnet_database.html
Which of the Database servers would you people recommend for using in a moderate-to-large scale (will vary from customer to customer) application.
I know MS SQL but since the app will be developed using delphi the .net framework is kind of annoying to deploy aswell. Also how realiable is Interbase.
Thanks in advance.
Since I have been developing in Firebird for several years now, if I were in your situation, I would look no further. The fact that you can develop your own extension library (udf library) in Delphi makes it very attractive to start with. Some of the new SQL constructs like the List aggregator and Common Table Expressions are icing on the cake. Deployment is very light (under 5 MB), and the support is excellent including incredible tools like IBExpert. I used MS SQL Server in a big company I worked at a few years ago and I would choose Firebird over MS SQL Server.
Data Access to SQL Server has nothing to do with the .NET framework. Delphi can connect just fine to SQL Server.
In terms of database engines that work with delphi, another you can consider is the Sybase Advantage Database server
Interbase is as reliable as they come. In fact, I'd like to get a job as an Interbase DBA, because I could uses the sleep.
I would definitely recommend looking at Interbase by Embarcadero or the open-source sibling, Firebird. Both are very well supported by Delphi by means of native, high-performance db-access components and such.
Interbase is a totally rock-solid database - I would put it on a par with SQL Server or Oracle. It's totally capable of handling medium to high traffic for at least 50-100 users concurrently, no problem at all.
Another two worth competitor would be Elevate DB and Nexus DB. Both grew out of Delphi file-based database systems, and both have been around for quite some time (in one form or another) and are well proven, widely used, well tested.
Marc
This seems back-to-front to me. I would choose the database server first, then select the development environment that works best with the selected database.
SQL Server. For 2005, you can make your own SQL Server deployment application that automates installing of Windows Installer 3.1, .NET Framework 2.0, SQL Server 2005 then installing the database through generatated SQL script (Feel free to contact me if you need help with it, I'd gladly help you). If you still insist on not installing .Net framework which is 22MB, I'd say go with SQL Server 2000 as you can still upgrade it to 2005+ when you'd like to.
Also, I had been using Advantage Database Server for few years and it's alright, Few DLLs to copy and you're ready to go even if you'd like to switch to remote version.
Both Server and Client installations of MS SQL require the .NET framework on the target machine. That's about it. If we can use ms sql without .net on target machine then ms sql is fine.
I have being developing in Delphi for about 6 years using distinct editions of SQL Server, and this database server behaved very very well. All of them were critical applications.
So, I would recommend you to keep with it.If you don't want to use .NET with and keep SQL Server I would recommend an older version pre-2005.
This isn't really an answer, but some things you might like to consider before making your mind up.
What do you mean by moderate-to-large scale? Do you mean by the number of concurrent users or by the amount of data being stored?
Are you going to be supporting the database as well when it's deployed, or might the customer have their own DBAs and want to incorporate it into their infrastructure team's remit?
Do you need to build-in complex features like auditing or granular security that some databases might provide out-of-the-box? Do you need to be able to run an overnight batch process on the database in some controlled manner?
Do you need to be able to have robust high-volume transactional support, or is it more for just using as a sink for reporting data? i.e. is it more OLTP or OLAP?
Are you limited by cost? i.e. does it need to be free/open-source, or can you select paid-for vendor product?
Both Firebird & Interbase are great, but not generally well-received into an "enterprise" environment in my experience unless they're "hands-off" and embedded into the application. MS SQL Server is a "safe-bet" for most systems. There is a cost associated with it but, as you know, it does come with a complete toolset and very good support.
If you do go down the Firebird or Interbase route then do take a look at Jason Wharton's IBObjects library which provides a high-performance replacement for BDE when using these databases. http://www.ibobjects.com/
We don't need multiuser. Just relational. Our app currently uses Access but Access isn't exactly zero-administration because it's prone to corruption.
Is SQLite rock, rock solid, pure zero-administration?
Or...is there a way to configure SQL Server as a desktop engine so that it is pure zero admin?
Or...is there some other relational choice?
We are using ADO as the layer to talk to Access, so switching to SQL Server wouldn't be hard, but my understanding is that I couldn't use ADO for SQLite, so switching to SQLite would require a lot of rewriting. Is that right?
Other databases may be more stable than Access, but I'm not aware of anything that's as easy to use, and as easy for an end user to understand. Access (like SourceSafe) is always called "prone to corruption", but few and far between are the first-hand accounts of this. Most people "read it somewhere."
Consider just including a backup routine with your app that keeps the last two or three copies of the Access database if you're that worried about corruption.
If you insist on something else, then try SQL Server Compact Edition (as other have suggested), which (like Access) is just a file, a .sdf file in this case, and a few DLLs. Unlike SQL Server Express Edition, SQL Server CE doesn't leave a background process running all the time.
Another option is embedded Firebird.
The most easy switch would be to go with SQL Server compact edition, it can be embedded in your app, and from some light testing that I have done, it works really well.
Going to SQL lite will require more modification of the DAL.
NOW note that SQL Compact Edition doesn't support stored procedures! (Shouldn't be a big deal, but be sure to research the differences)
There are ADO.NET wrappers for SQLite, not sure if that is what you want or just straight ADO. I have found SQLite to be very robust although you do need to VACUUM the database every now and then to recover unused space after deletions. You can do that from your code, so that isn't really administration. I just do it at startup or shutdown.
I agree with the others' opinions about SQL Express Edition. I use it for several apps.
If you are working with .NET, then you might want to look at Subsonic for your data access. It supports all of the above and more and makes switching fairly painless. For single user database apps, it is great. If you are going to do a rewrite, then it is worth it.
Since you are looking at no need for multiuser, you might want to check out SQL Server Compact Edition. http://www.microsoft.com/Sqlserver/2005/en/us/compact.aspx