Board index » delphi » PostgreSQL, MS SQL - Anyone with any experience?

PostgreSQL, MS SQL - Anyone with any experience?

I currently maintain a fairly large networked Delphi application using
Paradox files.  However with about 20 tables linked in a fairly complex
master detail arrangement, about 3,000 records being added per month, (one
of the master tables currently has about 16,000 records in it) and several
queries involving multiple tables, performance is pretty dreadful.

As a result I am wanting to move the application to an SQL database.  I
currently have a Linux server with PostgreSQL, and an NT Small Business
Server with MS SQL 7. Does anyone have any experience using Delphi (I have
Professional V4, BDE 5.01) to access these database systems, and are there
any tricks or serious code modifications involved when converting from
paradox to a C/S database.

Using the PostgreSQL ODBC link, I have managed to create a very simple one
table application that is working ok.  I haven't yet managed to get anything
to communicate with the MS SQL server though - the best I can achieve is a
connection but any type of SQL query (such as CREATE TABLE) fails with
syntax errors, even though I have followed the MS documentation to the
letter.

Some of the features I need the database to be able to do include:
An equivalent of the Paradox Memo field for storing variable length text.
Referential integrity
Default values
Reliable - able to withstand a client dying with open tables (something
Paradox can't do)
and of course, it must be reasonably quick.

If at all possible, I would like to be able to have pretty much the same
code also be able to access Paradox files, as we may be deploying some
standalone versions to run on laptops, that won't have permanent access to
the main servers: As a batch process at night, the main database gets
transferred to the laptops, so that they can access the same data off-line
the next day.

Thanks in advance for any information that may be of assistance.

Regards,
Graham Fountain.
PS: I don't mind if replies are sent to my email: grah...@myall.net

 

Re:PostgreSQL, MS SQL - Anyone with any experience?


On Wed, 28 Jul 1999 09:44:40 +1000, "Graham Fountain"

Quote
<grah...@myall.net> wrote:
>Some of the features I need the database to be able to do include:
>An equivalent of the Paradox Memo field for storing variable length text.
>Referential integrity
>Default values
>Reliable - able to withstand a client dying with open tables (something
>Paradox can't do)
>and of course, it must be reasonably quick.

>If at all possible, I would like to be able to have pretty much the same
>code also be able to access Paradox files, as we may be deploying some
>standalone versions to run on laptops, that won't have permanent access to
>the main servers: As a batch process at night, the main database gets
>transferred to the laptops, so that they can access the same data off-line
>the next day.

(I know this isn't what you asked, but I don't know PostgreSQL and I
know, but haven't used, SQL server)

Have you considered InterBase.  It's not expensive and there is the
possibility to install the Local InterBase server on those laptops
(It's very lean in memory).  You would get full compatibility between
the two type of installations, without needing 'ifs' in your code.

I suggest this because what works best with Paradox (tables and
indexes) is usually the opposite of what works best on C/S servers
(queries), and the other way around.

Regards,

--
Marco Rocci
MicroEra srl
Turin, Italy
-----------------
vota contro lo SPAM su: http://www.politik-digital.de/spam/

Re:PostgreSQL, MS SQL - Anyone with any experience?


Quote
Marco Rocci <mrocciNOS...@tin.it> wrote in message

news:37a710ea.23545758@news.tin.it...
<snip>

Quote
> Have you considered InterBase.  It's not expensive and there is the
> possibility to install the Local InterBase server on those laptops
> (It's very lean in memory).  You would get full compatibility between
> the two type of installations, without needing 'ifs' in your code.

> I suggest this because what works best with Paradox (tables and
> indexes) is usually the opposite of what works best on C/S servers
> (queries), and the other way around.

Thankyou for your input.  My main question was about any issues relating to
PostgreSQL or MS SQL, but it is always handy to get info on other options.
I would still prefer to use MS SQL or PostgreSQL on the server, since I
already have these - PostgreSQL seems to work, and with a bit of tinkering I
should be able to get MS SQL working too.

I see your point with local IB, and I assume that being based on C/S
architecture it would be closer to a full blown C/S solution  for code
compatibility than Paradox, even if the other database was based on a
different SQL engine.

I'm probably wrong here, but doesn't the license agreement with Local IB say
that it can only be used on the development machine for testing?

Back to my original post, does anyone have any feedback on how robust MS SQL
or PostgreSQL (or Interbase for that matter) are?  I am a little dubious.  I
have had bad experiences with other MS server products, and with PostgreSQL
being free it does give some element of doubt.  Since the information being
stored is fairly critical to the organisation, stability is a fairly
important concern.  Having said that though I am fairly confident that all
three would be streets ahead of our current networked paradox solution,
which needs the table repair utility running on it almost everytime one of
the workstations crashes.  I would greatly appreciate any comments regarding
this aspect of these servers - either on this newsgroup or direct to my emai
l: grah...@myall.net.

If I go with PostgreSQL, I will post some info with what experiences I
encountered on this NG.  From the early testing I have done it seems to
deliver exceptional performance - about a second to retrieve a 50 row result
set from a query based on two tables of around 15000 records each - and this
was done via a 33.6k modem link, from a server that is only a P133 with 32MB
RAM.   I suspect that there may also be others interested in using
PostgreSQL with Delphi.  For the small business sector, this sort of result
means that it is feasible to have high performance WAN based applications,
at a very affordable price point.  A Linux server with PostgreSQL is
certainly a heck of a lot cheaper than an NT server with MS SQL

Quote
>Regards,

> --
> Marco Rocci
> MicroEra srl
> Turin, Italy
> -----------------
> vota contro lo SPAM su: http://www.politik-digital.de/spam/

Re:PostgreSQL, MS SQL - Anyone with any experience?


On Thu, 29 Jul 1999 10:16:42 +1000, "Graham Fountain"

Quote
<grah...@myall.net> wrote:
>I see your point with local IB, and I assume that being based on C/S
>architecture it would be closer to a full blown C/S solution  for code
>compatibility than Paradox, even if the other database was based on a
>different SQL engine.

It is a full-blown C/S.  You have triggers, procedures, security,
everything you have in IB server.  The database file is the same (you
can open the same file with either version.  The only problem you'd
have is that having the local server and the app on the same machine,
if power goes out, you can't do anything about it.  But that's also
true with Paradox.

(and remember that IB goes on Linux too).

Quote
>I'm probably wrong here, but doesn't the license agreement with Local IB say
>that it can only be used on the development machine for testing?

No, it is not freely distributable.  Out of curiosity, I just checked
the prices of current version:

  Server: $200
  1 user: $150
  10 user: $1200 ($120/user)
  20 user: $2100 ($105/user)

  Local IB: $100
  Local IB - 100 pack: $4000 ($40/each)

That doesn't seem like much.  I know M$ has also lowered prices on SQL
server, but I haven't seen them yet.  I think SQL server gives a bit
more headaches than IB (at least, judging from the messages in
borland.public.delphi.database.sqlservers, but it may simply be that
there are simply more people using it).

I'm sorry I can't help you on the other products.  Have you already
used PostgreSQL?  How is it?  Where can I find some info?

--
Marco Rocci
MicroEra srl
Turin, Italy
-----------------
vota contro lo SPAM su: http://www.politik-digital.de/spam/

Re:PostgreSQL, MS SQL - Anyone with any experience?


Quote
Marco Rocci <mrocciNOS...@tin.it> wrote in message

news:37a016a3.3275140@tor-nn1-ca.netcom.ca...

Quote
> On Thu, 29 Jul 1999 10:16:42 +1000, "Graham Fountain"
> <grah...@myall.net> wrote:

> >I see your point with local IB, and I assume that being based on C/S
> >architecture it would be closer to a full blown C/S solution  for code
> >compatibility than Paradox, even if the other database was based on a
> >different SQL engine.

> It is a full-blown C/S.  You have triggers, procedures, security,
> everything you have in IB server.  The database file is the same (you
> can open the same file with either version.  The only problem you'd
> have is that having the local server and the app on the same machine,
> if power goes out, you can't do anything about it.  But that's also
> true with Paradox.

> (and remember that IB goes on Linux too).

Thanks for this info, I'll have another look into IB - I have dismissed it
up until now because as I said I already have MS SQL (came with Small
Business Server), and PostgreSQL was free to download, so there was nothing
for me to lose in trying it out.

Quote

<snip>

> I'm sorry I can't help you on the other products.  Have you already
> used PostgreSQL?  How is it?  Where can I find some info?

www.postgresql.org
As I said in my earlier posts, with the very little testing I have done, its
performance seems excellent - especially when compared to file server
databases like paradox.  Being new to the Client/Server field, though, what
I think is excellent could be just standard fare when compared to other
similar products.  I haven't done much yet, just created a few tables,
stuffed a bunch of sample records in them, and run a few queries.
Considering I have never used C/S databases before, and I achieved this with
a Delphi program within a few hours of downloading and compiling the server
software, I think that is pretty good going.  I spent a week of
head-scratching trying to convince Delphi to talk to the MS SQL server, and
still haven't managed to create a single table.

There is also an ODBC driver available for download, do a bit of hunting
through the links from www.postgresql.org and you should find it.
Apparently the source code can also be compiled for Windows NT - I haven't
tried this yet.

- Show quoted text -

Quote

> --
> Marco Rocci
> MicroEra srl
> Turin, Italy
> -----------------
> vota contro lo SPAM su: http://www.politik-digital.de/spam/

Re:PostgreSQL, MS SQL - Anyone with any experience?


On Thu, 29 Jul 1999 10:02:55 GMT, mrocciNOS...@tin.it (Marco Rocci)
wrote:

Quote

>(and remember that IB goes on Linux too).

Yes, it does. I have it and I love it.
Quote

>>I'm probably wrong here, but doesn't the license agreement with Local IB say
>>that it can only be used on the development machine for testing?

I am using version 4 for linux wich is freely distributed ( as far as
I know). Try it to find that version on their site.

Quote
>No, it is not freely distributable.  Out of curiosity, I just checked
>the prices of current version:

>  Server: $200
>  1 user: $150
>  10 user: $1200 ($120/user)
>  20 user: $2100 ($105/user)

>  Local IB: $100
>  Local IB - 100 pack: $4000 ($40/each)

>--
>Marco Rocci
>MicroEra srl
>Turin, Italy
>-----------------

Sasa Stjepan Baksa
Osijek, Croatia
sba...@mia.os.carnet.hr

Re:PostgreSQL, MS SQL - Anyone with any experience?


On Thu, 29 Jul 1999 21:21:45 +1000, "Graham Fountain"

Quote
<grah...@myall.net> wrote:
>> (and remember that IB goes on Linux too).

>Thanks for this info, I'll have another look into IB - I have dismissed it
>up until now because as I said I already have MS SQL (came with Small
>Business Server), and PostgreSQL was free to download, so there was nothing
>for me to lose in trying it out.

I forgot to say that IB 4.x for Linux should be free to download also.
(I've used the 4.x that came with Delphi both on NT and Win95.)

Quote
>> I'm sorry I can't help you on the other products.  Have you already
>> used PostgreSQL?  How is it?  Where can I find some info?

>www.postgresql.org

Thanks... I'll have a look.

Regards,

--
Marco Rocci
MicroEra srl
Turin, Italy
-----------------
vota contro lo SPAM su: http://www.politik-digital.de/spam/

Other Threads