Planning to use PostgreSQL with ASP.NET: bad idea? - sql-server

I'm currently planning the infrastructure for my future web project. I want to go the way Joel went with having one DB per client and now thinking which DB engine will be good for me. The best would be of course SQL Server, but I can't afford a full-blown version at this moment and I don't think SQL Server Express will be a good choice for the loaded service. Now I'm thinking of using PostgreSQL instead. Given that my development environment will be ASP.NET 3.5 with say NHibernate or LINQ to SQL, how much trouble will I have if I use PostgreSQL instead of SQL Server?
Thanks!

NHibernate works OK with PostgreSQL (whether the db is on Windows or UNIX-like OSes) and .NET works well with it using the Npgsql db provider.
The only "trouble" you'll get is of course PostgreSQL doesn't do T-SQL. In fact its PL/pgSQL stored proc language is closer to Oracle's PL/SQL than it is to MS SQL Server's T-SQL. So you'll have to recode your stored procs, and there will be some gotchas to watch out for if you do ADO.NET. If you use NHibernate, you probably won't have to worry much about that. No LINQ to SQL though, so tough luck for you.
PostgreSQL is scalable and works OK now with Windows (earlier versions didn't support Windows formally), and pgAdmin is a good management tool for it, you'll be able to do most of the stuff you can do with SQL Server's GUI tools with it in a short time.

I don't think it is a bad idea, but a great experience.
By the way NHibernate is the way to go Linq to Nhibernate is under heavy development and available in the trunk so if you do care "which I don't care" about Linq don't be scare to use it.

Why not start with SQL Server Express and migrate when you have the money? That way you can move toward what you consider ideal and reduce conversion costs.

If you go with PostgreSQL you won't be able to use LINQ to SQL. Currently LINQ only works with SQL Server (possibly Oracle). I'm not sure about NHibernate. Also, if you use PostgreSQL, last time I checked, they had dropped windows support. So you'll be looking into having a second box running Linux for the DB.
[EDIT]
It turns out PostgreSQL is supported on windows. I can't recall where I saw support being cancelled. Anyway, I've heard it runs better on Linux anyway, so you might want to look into doing that regardless.

These days,postgres works really fast with .net and it is as good or even better than the proprietary mssql

Related

Lightweight ETL or database Sync - Sybase to SQL Server

I have been doing some investigations into some light weight database Syncing tools to trial. The initial task we want to perform is a simple data sync from a few tables on a Sybase ASE database (15) to a SQL Server database (2008 R2). Timing wise, I'd like to keep my options open, but ultimately, I would like to have the ability to sync every minute or less.
I have been looking at SymmetricDS, which at face value seems to do exactly what I want it to. The drama is I have hit a couple of roadblocks on the Sybase side of things, which is proving to be very frustrating (Jumpmind support are assisting). It appears that Java has a problem with the default collation we have on our server, being HP-roman8. Unfortunately, to change this charset is way bigger then this project itself.
I have also started investigating Talend, but have hit a few roadblocks in relation to requiring older versions of drivers for Sybase and downgrading the installed version of Java.
Without having to go to Replication Server, does anyone have any suggestions on a relatively lightweight ETL or database Syncing tool that will do what I want? The biggest gotcha thus far is Sybase support - I really need something that will seamlessly work without having to hack too much.
Cheers
You should try uniVocity. It is a Java-based ETL framework that certainly can help you do what you need. You can use any JDBC driver, define your mappings with a few lines of code and have this working faster than a traditional ETL tool.
Have a read through its tutorial and also check out a few sample projects here
Disclosure: I am the author of this library. It's open-source and free (Apache V2.0 license).

What is The Best Local DataBase Managment Software?

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

Delphi - Database Server

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/

What's the best zero (near zero?) administration relational database for a windows desktop app: Access, SQLite, SQL Server, other?

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

Database engines Comparison - Windows Mobile

What are the different database options on Windows Mobile available?
I have used CEDB and EDB for linear dataset needs.
I have heard of SQL server 2005 Mobile edition. But what are the advantages over others (if there is any)
I've found both sqllite and codebase to be easy to implement and install. Easier (and more stable) than the Microsoft options, which seem to be in serious flux.
Also take a look at SQLite for Windows CE. There are also .NET bindings available to use it from the Compact Framework.
I think it's called SQL Server Compact now. The advantages are that it's syntax-compatible with full sql server in that any query you write for it is guaranteed to work on an equivalent SQL Server Express/Standard/Enterprise DB. The reverse isn't necessarily true, though.
Do you need SQL support? If not, look at a lightweight embeddable DBM-like solution. I've used Tokyo Cabinet for a number of embedded solutions where SQL wasn't necessary and have greatly enjoyed the speed and flexibility it provides. YMMV.
We use Sybase Ultralite. Before that we were using Codebase to connect to foxpro tables. I'm not a mobile developer but I understand we chose it over SQL Server for performance and memory usage. Also we found they had pretty good support when we found any issues.
I would avoid using CEDB any more as I beleave that WM7 is dropping support for it.

Resources