Make a web site - 670Part IVConnectionsHowever, this is the kind of statement

670Part IVConnectionsHowever, this is the kind of statement that often makes experienced systems builders rolltheir eyes because it shows a focus on code-level concerns while ignoring big-picture issues. First off, there is a very serious performance hit associated with using PEAR DB which makessense, since the question should never be Will abstraction degrade performance? but Howmuchwill abstraction degrade performance? PEAR DB s basic design written in PHP itselfinstead of C, fully object-oriented, re-copying result sets into multidimensional arrays, includingmany databases which have significant differences in functionality indicates that performancewas not the primary concern in its design. An informative benchmark comparing the nativeMySQL database extension to various database wrapper classes accessing MySQL can befound at http://freshmeat.net/screenshots/30313/. Furthermore, PEAR DB s develop- ment always trails behind database and PHP development and is not always able to includeevery high-end feature so you may not be able to use cool new functions of your DBMS viaPEAR DB for some time or at all. Also, if you have the theoretical ability to support your app with a bunch of databases, are you taking on the practical responsibility of doing so? Sometimes it can save you a lot of headaches to say, We can only support MySQL andPostgreSQL and let it go at that. Furthermore, the mere fact that PEAR DB can give you the ability to connect to multipledatabases does not mean that the same code will work with all of them. In the theoreticalbest-case scenario for instance, using only the most common functionality shared betweenPEAR DB and Its CompetitorsPEAR DB is one of a plethora of competing database abstraction layers written in PHP. Some ofthe others are Metabase, ADODB, PEAR MDB, and PHPLIB. Much of the information in this chap- ter can also apply to them, although their APIs are obviously slightly different and in some casesnot object-oriented. The clear advantage of PEAR DB over these others is that it s distributed with PEAR, which is gen- erally distributed with PHP. Remember that in no way is the PHP Group itself recommendingPEAR DB they have staunchly refused to get involved in this issue for years, despite the pleas ofmany PHP community members that they would anoint an official dba product. The PHP Groupmerely agrees to distribute packages chosen by the PEAR Group, which formed in August 2003. Because PEAR DB is the one product in this category that we can be fairly certain readers willhave installed, we chose to focus on it. PEAR DB has recently been merged with Metabase to produce the combined PEAR MDB pack- age, which the developers hope will become the de facto standard PHP database abstractionlayer. If this marriage, which has been proceeding gingerly for various reasons, goes forward suc- cessfully, at some point MDB may replace PEAR DB in the distribution. However, the PEAR DBAPI will still be used with the Metabase code underneath that, so hopefully PEAR DB users willnot need to make any code changes should this replacement occur. Finally, there have been persistent low-level rumors of the possibility of some kind of databaseabstraction layer being written in C rather than PHP, which would potentially reduce the perfor- mance drawback of these packages. The difficulties of this approach are many, however, and nocurrent project seems to be seriously pursuing a rewrite of this kind.
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Leave a Reply