Re: Connecting website with SQL-database.....

Поиск
Список
Период
Сортировка
От Manuel Lemos
Тема Re: Connecting website with SQL-database.....
Дата
Msg-id 4183.149T1516T2724477mlemos@acm.org
обсуждение исходный текст
Ответ на Re: Connecting website with SQL-database.....  (Lincoln Yeoh <lylyeoh@mecomb.com>)
Список pgsql-general
Hello Lincoln,

On 24-Apr-00 00:37:20, you wrote:

>At 09:02 PM 21-04-2000 -0200, Manuel Lemos wrote:
>>It's a trade-off.  If you want to take the most of a database non-standard
>>extensions, don't use database abstraction packages at all.  If you want
>>flexibility in such way that your applications will be more portable,
>>database abstraction packages are the way to go.

>Yep. But can enough useful stuff be abstracted to be common amongst most
>databases?

Sure.  There are features that are abstracted like transactions and are not
supported by all DBMS.  You may query the Metabase driver to verify which
features are supported.


>>>Plus some people seem to want Postsgresql to do transactions Oracle style,
>>>whereas some might want Oracle to do transactions Postgresql style. So how
>>>about Metabase helping out?
>>Like other database abstraction packages Metabase only provides 3 functions
>>to handle transactions:  AutoCommit(On/Off), Commit and Rollback.
>>AutoCommit(Off) implicitly starts a new transaction.  AutoCommit(On)
>>implicitly ends an ongoing transaction commiting any work done. Commit

>But with Oracle if you do a create table an implicit commit occurs. That's
>not true for Postgresql.

That is not a problem. That is like issuing some query and then commiting. When
you call Commit or AutoCommit(Off) and a commit command is issue. Oracle does
not complain if you commit when there is nothing to commit.


>Plus if you get a warning/error, Postgresql _requires_ you to rollback,
>whereas many other databases don't.

That's what Metabase expects. When there is an error, you should rollback
before exiting a transaction with AutoCommit(Off).

I noticed the discussion but I could not quite figure what was the problem.


>Quite a number of people on this list, including me have found these
>differences to be significant.

So, how does ODBC and JDBC drivers handle those differences?


>>Currently there is support for MySQL, mSQL, PostgreSQL, Oracle using OCI.
>>The MS SQL server driver is almost ready.  There is somebody working on
>>Informix driver and possibly Sybase ASE. We could already move seeminglessly
>>between applications.

>Cool, someone I know has been looking for Oracle support for PHP. Not sure
>why he didn't find it earlier.

Some people want to access Oracle remote servers but they still need client
libraries in the local machine to access it from PHP.  Maybe that was the
problem.


>>Despite of that, the lack of such a complete database abstraction package
>>for PHP is attracting many developers and some are willing to contribute
>>with new drivers.

>Yep, I found it quite surprising and annoying that I had to recompile php
>(version 3) when I wanted to add support for various stuff, and that's not
>just for database stuff.

Thats when you to build PHP with modules statically linked.  PHP developers
stop providing pre-compiled versions of PHP on Unix because there are
simply to many Unix systems and possible configurations.  Under Windows PHP
is always distributed with modules as DLL.  There are Unix distributions of
PHP that come with modules as shared libraries but that is known to be
slower due to late binding every time a new server process starts PHP.


>I haven't been keeping up with the php scene much tho - still using perl.
>Perl is respectably fast compared to C++. For example string concats
>weren't much slower compared to C++. But it's about 13 times slower for
>floating point stuff. That's not a big problem for most of my apps tho ;).

Zend engine gave a major boost to PHP.  With the optimizer, for pure
processing tasks can run as much as 16 times faster under Unix.  Under
Windows with the new SAPI based ISAPI drivers the difference can be even
higher.

Anyway, pure processing tasks are not the most common use of PHP database
and network I/O are more often the bottleneck.


Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--


В списке pgsql-general по дате отправления:

Предыдущее
От: Joachim Achtzehnter
Дата:
Сообщение: Re: Revisited: Transactions, insert unique.
Следующее
От: Ed Loehr
Дата:
Сообщение: Re: Connecting website with SQL-database.....