views:

905

answers:

7

I started with Turbo Pascal 3, went to TP5, Bought TP6 called Borland the next day and downgraded to TP5.5. Bought Delphi 3, and now have Delphi 5 Enterprise. I sort of lost interest in writing code about 4-5 years ago for two reasons;

  1. Spent all day writing ASP & SQL for someone else.
  2. PC Techniques magazine went away.

I've got a few programs in the shareware market that are solid performers but are in need of serious updating. I love Delphi or did when it was Borland (before Borland bought DBase and all the other crap), I'd like to salvage as much of my D5E code as possible but I doubt I can. I plan on upgrading to Delphi 2010.

My next software release needs to interact with a database. I'm very proficient with MS Sql and like to put all of the database code in stored procedures.

What is the best database choice that interacts well with Delphi, allows stored procedures and is so easy to deploy that even the Geico gecko could deploy it?

10/25/2009 18:53 PM EST
Re-Opened After Reading Install Docs for Delphi 2010


I downloaded a trial version of Delphi 2010 and unzipped the install. I've been reading the install docs included in the package. I started with the install.htm inside the zip package.

install.htm wisely tells you to see the following two articles:

  1. Installation Notes: http://edn.embarcadero.com/article/39754
  2. Release Notes: http://edn.embarcadero.com/article/39758

the release notes state the following...

MSSQL driver requires the installation of the SQL Native Client. SQL Native Client 2008 is required for dbxmss.dll. SQL Native Client 2005 is required for dbxmss9.dll

I checked my machine to see if SQL Native Client is installed. Nope. I wasn't done reading the docs so I made a note to install SQL Native Client.

I googled dbxmss.dll and dbxmss9.dll and found a very interesting thread on the Embarcadero forums. read thread here.

After reading this thread and some careful thought I don't think I will be using Microsoft SQL Express. I can't rely on my customers having the right drivers installed. So, I'm back to looking for a different solution.

If I'm selling a $40 product to the general masses I need to have a bulletproof solution that doesn't require my brand new customer to update their machine before my software will work.

+11  A: 

How about Firebird? It can be used as an embedded database (xcopy deployment).

Other options include DBISAM and ElevateDB.

Bruce McGee
Thanks, I've requested a trial download of ElevateDB. It looks pretty good and I like the way the support forum gets answered. I'll have to tell them about StackOverflow.com
Cape Cod Gunny
+1 for Firebird
Hugues Van Landeghem
I can't say enough good things about ElevateSoft. It's a small company, but they've been doing nothing but Delphi databases for over ten years. I was recently contacted about upgrading a Delphi 3 application from 1999 and when I emailed ElevateSoft they remembered who I was.
Larry Lustig
Larry, the more I think about it the more I'm leaning toward ElevateSoft. Here's my thinking, they use Delphi to create their product. Their product will most likely integrate flawlessly into the IDE. If I have a problem they will give me a Delphi answer that makes sense. So I'm thinking that Delphi App + Delphi Component = Win Win.
Cape Cod Gunny
@Cape Cod Gunny: Good choice. I've had a lot of luck using DBISAM and now ElevateDB.
Bruce McGee
Firebird is out. It doesn't support auto-incremented values without using a trigger or function.
Cape Cod Gunny
I have used Generators for (thread safe) unique key values in Interbase (similar to "Sequences" in Oracle). Presumably they work the same way in FireBird. http://www.firebirdsql.org/manual/generatorguide.html
Bruce McGee
ElevateDB is the choice, thank you Bruce.
Cape Cod Gunny
+2  A: 

I have been developing with Firebird for a few years now after about 10 years working for a couple of companies that used VB6 and MSSQL. The transition from MSSQL to Firebird was almost as easy as the transition from VB6 to Delphi. I use the personal version of IBExpert for database administration and I have to say I never saw anything that could hold a candle to IBExpert in the SQL Server world.

On top of that, there have been several times when I have been able to solve problems using UDFs written in Delphi that would have been slow and ugly and awkward in SQL.

Stored procedures can be quite powerful in Firebird PSQL. I think cursors are much more natural in Firebird PSQL than they are in MS SQL.

I use DBExpress to interact with the database. It's fast, light and easy just like Delphi, just like Firebird. If your program will include reporting, check out FastReports. For my purposes, it has more power and is much snappier than Crystal and will require no separate installation for your users.

I don't know about the Geico cavemen, but I am sure the Gecko could do it.

Are the applications you develop for in-house use or is it software that is sold to the general public?
Cape Cod Gunny
Sort of both. Having been an accountant for 25 years and being grossly disappointed with the tools I could find to do payroll, I had my own itch to scratch. I wrote my own payroll. It's super fast and easy to extend. I have been using the payroll on a couple of my own clients for almost two years. At this point, I'm feeling like I have my act together and I want to take it on the road. There's a lot to do yet, but I expect the installation of my program and database to be the easiest part.
+2  A: 

If you're already proficient with MS SQL, just use the Express edition of MS SQL Server 2008. We've used the 2005 edition for several commercial projects, and have started using 2008 now too. It's very, very good; very well supported and there's tonnes of help, documentation and samples out there. There's a lot of good SQL Server expertise right here on Stack Overflow!

Another well supported approach, as others have said, would be Firebird/Interbase. The sproc language is very powerful and in particular I like the way you can use the 'suspend' command in a sproc to return the current state of play to the caller as a row in the result record set, then when the caller asks for the next record, your sproc resumes. This has proved an incredibly useful tool in debugging complex sprocs in the past. :-)

With either of these databases you will be fine using your apps in-house or shipping them commercially.

robsoft
Express edition of MS SQL Server does not support stored procedures.
Cape Cod Gunny
@cape cod gunny : It DOES!! - I have a 2005 Express database right here in front of me with 212 sprocs.
robsoft
That's great... thanks. I spent 6 hours over 2 days reading the specs on Microsofts site. I compared all the different versions and could not believe Express ignored sprocs. Either I forgot how to read or MS changed it's documentation. http://www.microsoft.com/sqlserver/2005/en/us/express-features.aspx
Cape Cod Gunny
No problem, glad to help - was just about to send you a link to their comparision pages myself!
robsoft
Does Express allow temp tables?
Cape Cod Gunny
Yep, temp tables and also using tables as local variables inside sprocs. Here's that feature matrix I mentioned; http://www.microsoft.com/sqlserver/2008/en/us/editions.aspx Unless you're doing complex replication, data warehousing stuff or you need to make use of a very powerful server, it should be fine for most ISV/internal type projects.
robsoft
Can SQL Server Express be used as an embedded database (xcopy install)?
Bruce McGee
Bruce - not really IME, although I might be wrong. You can certainly install additional databases, attach them and use them (that) silently, but in my experience the initial installation and configuration does require some user intervention. I've seen and used a commandline 'silent' install from within my app's own installation program, but on some machines there were additional things required (.Net framework updates etc) and so I must admit I've not seen it successfully (repeatedly) install and run 'silently'. Once installed though, it's effectively embedded.
robsoft
@robsoft - How do you define an embedded database? I think of it as not requiring a separate install/uninstall, which is why I suggested Firebird embedded and DBISAM/ElevateDB.
Bruce McGee
robsoft
@robsoft - If it requires a seperate install (silent or not), or if a separate server has to be run, then I don't consider it to be "embedded". You wouldn't believe the grief we had supporting the Interbase 6 "silent" install. I notice that there is a "compact" edition of MSSQL that looks like it really is embeddable. http://www.microsoft.com/sql/editions/compact/comparison.mspx
Bruce McGee
@Bruce - I'd agree with that. (Funnily enough we too had plenty of 'fun' with IB 6, the open source version). I've never looked at ElevateDB, or Nexus, or even a more recent version of Firebird, but I'd consider looking at them for properly 'embedded' solutions.
robsoft
A: 

How about MySql?

It is been actively developed and there is a large user base

Charles Faiga
MySQL is not free and more expensive than the price of the software. So don't suit for this question.
Hugues Van Landeghem
+1  A: 

Firebird = Best Database for Small Business App.

MajidTaheri
I'll believe you if you say so, but your answer would be more interesting if you'd provide some reasons.
Wouter van Nifterick
+3  A: 

Just a little recent post about What databases do you use in your Delphi programs?

Firebird is the winner

Hugues Van Landeghem
Nice piece of info. Thanks.
Cape Cod Gunny
+1  A: 

Take a look at NexusDB, it's compiled in you application so nothing else to deploy. If you are in a budget you can even use the DCU free version.

Daniel Luyo