Looking for a good embedded db for my asp.net apps while trying to avoid SQLExpress (I need it to be a downloable file(s) with no need to install at server), I found Firebird. But:
According to this:
http://en.wikipedia.org/wiki/Embedded_database#Firebird_Embedded
It has the same features as the classic and superserver version of Firebird, except that two or more THREADS (not just applications) cannot access the same database at the same time. So Firebird embedded acts as a local server for a single threaded client accessing its databases (that means it doesn't work properly for ASP.NET web applications)
According to this http://www.firebirdsql.org/en/development-net-provider/, however, there are some ASP.NET providers released.
Weekly builds of the ADO.NET Data Provider, the ASP.NET Web Providers and the DDEX provider can be found here.
So the question is: is it or is it not a good embedded db alternative to use in asp.net?
If not, what would you recommend instead?
I have fixed the wikipedia article , firebird 2.5 embedded is fully multithreaded and it is fully supported for asp.net
http://blog.cincura.net/231742-firebird-embedded-in-comparison-to-sql-server-compact-edition-4/
Also from what i have read on jiri's blog it is possible to run it on azure
http://blog.cincura.net/232332-using-firebird-inside-azure-without-vm-role/
and on amazon
http://blog.cincura.net/232333-amazons-ec2-micro-instance-and-firebird/
Yes, it is. And I believe it is one of your best options.
Specially because you will be running it in a non MS environment. I know PostgreSQL is a good Open Source DB, but it does not have an embedded version.
Your other option is SQLite.
One thing that might be worth looking at is SQL Compact. The latest version works with ASP.NET and runs in-process. All you need to deploy is a couple of DLLs.
I must confess I don't really know anything about Firebird so can't compare it directly.
Related
I have a classic ASP front end which serves to collaboratively enter data into a sqlite database, meant to be used later in an android app. I need to deploy this ASP webapp onto an online server with sqlite odbc installed, because the only other option I know is to use my own computer as a server, and I don't think it would be a good idea to keep my fairly modest PC always on for 3 months or so.
The problem is, I can't find any server (preferably free) fitting these requirements.
Any ideas?
For example, is it possible to host just the sqlite file somewhere, and have the asp script (which I will then install on all the users' machines) access it remotely? I've looked around, and I've found a solution (for MS Access), but it involves changing user permissions on the server machine, which I won't be able to do.
Ok, I came up with a good solution:
I imported my database into MS Access (from Access -> external data -> ODBC database -> follow the steps to choose your database). It works well with my ASP front-end after a few minor modifications.
I can now use any ASP hosting service as they all support MS Access.
When I'm done, I can convert it back to sqlite using this excellent program (SQLite2009Pro - it's actually free despite what the name may imply). I've tested the converted database with my android app and it works flawlessly.
Hope this helps anyone who's still stuck using ASP like me.
We're upgrading our systems to support clustering and auto failover features. Our business runs .NET 4 applications, web apps and services on SQL Server Express. We can upgrade to SQL Server Standard, but the cost has motivated us to consider other options. Is it a legitimate option to integrate our .NET data layer with ODP.NET? After searching, I have seen a tendentious statement or two in the negative (viz) and yet it would seem that people are doing it anyway. What development features in the Visual Studio IDE will we lose? Thanks for your help!
Well, I'm now working since 20+ years with Oracle and MS SQL Server, having done a lot of projects. Some projects are running now more than 10 years, with all the updates, maintenance and so on.
My quick answer is: Stay with MS SQL Server. Go to Oracle only, if you have really GOOD TECHNICAL reason, or if you are planning really an ENORMOUS database, and if you have enough staff to handle all thge administration.
The main reason is that SQL Server is much easier to maintain; and it also integrates greatly into the Microsoft environment.
Oracle, in contrast, has a steep learning curve. The handling of Oracle is much more "manual" then MS SQL Server. Well, that's also a good thing, because you are in control of every small detail, but it also means that you need to learn a lot; or you need to pay experts. And it is not so easy to find people who really know what to do.
I really like both Systems, but for a rule of thumb, I normally suggest to use MS SQL Server.
I've been using .net with Oracle for years, and migrate away from it whenever the option is available.
If all your database code is in stored procs and you call it though the codebehind or a library and you use ansi sql your migration from ms sql to oracle will be fairly painless.
If you use TableAdapters, they re-write any sql you put in to the oldschool oracle 8 syntax like table1,table2,table3 then have a big where clause to do the join conditions. There's also some weird bugs where sometimes sql that runs fine over in SQL Developer won't work in the TableAdapters.
If you use Entity Framework migration should be pretty easy, but the MS SQL driver is much better then the Oracle one. There have been several queries I couldn't do though EF in oracle because of some of the various errors with the current driver.
If you need more info let me know.
Also if Cost is the main reason to consider migration, why not go with mysql?
Since you are already working in MS SQL, you must be habitual of the way it work, be it entity framework or any other data execution. Yes offcource, microsoft has very high license rates for it. But if you want to move to any other database, it is perfectly alright. I have personally used MS SQL and MySQL both. Initially you might face some syntax related issues, but do remember that logic remains the same for fetching and saving the data. Further it gives a benefit that you got to learn a new language and that too at the expense of far less money.
I've got a client who wants an ASP.NET MVC application. I'll develop it with VS.NET 2010 Express, demo it to him on my Linux server during its development (Mono supports ASP.NET MVC), and he'll eventually host it on a commercial provider running IIS.
Getting this done quickly is the name of the game. The only piece I'm missing here is the database layer. Ideally I'd use SQL CE and EF4. But SQL CE only works on Windows, and Mono doesn't support the Entity Framework anyway.
The only free Linq to SQL-like option I see is DbLinq. A quick test with that on a MySQL database had it erroring out on a table that had two foreign keys to a single primary key. A search on Google shows that this bug was identified, and a patch was created, two years ago or so. That the patch still hasn't been applied to the main source by now, and that this bug seems to affect so a common scenario, does not fill me with confidence on the production-readiness of DbLinq.
Even if it did work, it'd have to be with MySQL, as that's the only database I can expect to be available on both Linux and an eventual Windows server. (SQLite, Berkeley DB, etc., would all require some native drivers be installed on the server, which I can't count on.)
I don't know NHibernate. But from what I read, it requires manually creating XML mapping files... so I don't have to write SQL statements, but I do have to create mapping files? (Plus I'd need to learn how to use it.) Like I said above: Getting this done quickly is a goal here.
If I must, I will just pony up the $5 a month or so for a cheap ASP.NET hosting provider and use that to demo progress to the client, using SQL CE and EF4. But before I do that I'd just like to see if there are any other viable options. (It's kind of mostly an intellectual exercise by this point.)
So... any tips?
Does it really have to be a fully bloated ORM?
I recommend to have a look at some of the so called "micro-orm`s", especially my favourite one: Peta-Poco (http://www.toptensoftware.com/petapoco/)
Peta-Poco runs perfectly under mono and has an incredible performance. Even better, because of the small codesize (~1k lines of c#) it is very easy to understand what`s going on under the hood and you can easily change/extend the code to your needs. For the start you just have to copy the single .cs file in your project and you are ready to go.
Peta-Poco has a very well poco-mapping heuristic so you will get your c# objects out of the db with zero configuration for the most cases.
You COULD try Linq-to-SQL. Partially supported under Mono from 2.6, it supports many dbs under mono Release Notes Mono 2.6 (they are working with those of DbLINQ to make it).
Ah... Forget to learn quickly how to use nhibernate. It's very good but it's quite an hell. And creating the XML is the least (and with NHibernate 3.2 they have added their version of Fluent interfaces, so XML aren't anymore necessary I think. You can "code" your XML.)
I searched on Google and I can't find any, do you know some ?
Not that I'm aware. Most open source projects however use one specific database engine (which makes sense), or xml (for example dasBlog).
However you can always swap your SQL Server for MS Access in a project if you want. The provider system for membership etc in ASP.NET itself is already a great example of that possibility (though not open source as it comes from Microsoft). For example take a look at this tutorial: Using Access instead of SQL server for your ASP.NET Application Services.
Personally I would rather find it strange to see an open source project making use of 2 different, especially MS Access in the first place. People tend to use SQL Server Express or SQLite or SQL CE for something like this.
Is the generated aspnetdb.mdf ever meant to be used online? It has been a while since I looked at it, but from what I remember the generated username database could only be configured and maintained locally within your visual studio environment. Is this still true? Does anyone use this online for big apps?
EDIT:
I ask because all the examples I see just use the built in VS tools to build the example database, but I haven't found where they did a "real" one online.
EDIT:
It just seemed like a big let down to know that you could create this username/password db for use in your projects and then find out you really can't.
It is simply a SQL Express db. You can certainly maintain the membership information in aspnetdb.mdf through your own administration pages if you want to.
As a matter of fact, if you're going to use SQL Express as your database (very limited scenarios where this would be appropriate) you could add the rest of your tables/sprocs to aspnetdb.mdf and use just the one db rather than using aspnetdb.mdf for membership and creating another one for your other needs.
This article has information on the limitations of sql express as well as links to the featureset (2005, 2008)
Basically the limitations are:
Only 1 CPU. If a system has more than 1 SQL Express 2008 will still run but limit itself to 1 CPU.
RAM: 1 GB. More RAM can exist, but again SQL Express 2008 will only make use of a maximum 1 GB.
Max Database Size: 4 GB
configured and maintained locally
within your visual studio environment.
Is this still true
No, it's not true.
You can use aspnet_regsql scripts to generate all the required tables/scripts/views in your database, and you don't have to use the aspnetdb.mdf.
After all, it's just a bunch of database objects required by the membership/security api.