Re: Re: [PEPr] Proposal for Database::DB_Table
| From: | Paul M Jones | Date: | Wed, 07 Jan 2004 18:11:48 +0000 |
| Subject: | Re: Re: [PEPr] Proposal for Database::DB_Table | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24870@lists.php.net to get a copy of this message | ||
On Jan 7, 2004, at 12:00 PM, Alexey Borzov wrote:
Of course this *brilliant* solution has several major flaws:I like your ideas too, Alexey, but you really should stop flirting in public. :-)
1) DB-specific timestamp may have a (far) wider range than 4-byte integer, and a better precision. Try storing a list of birth dates as integers, to get my point well, or some scientific data with milli- and micro-seconds... 2) DB-specific timestamp may have timezone information. 3) RDBMS may have sophisticated date and time-related functions that for some strange reason will *not* work on integers.They may indeed. If one wants to use database-native functions, one should write for that database and not use a PEAR DB wrapper. Regarding precision, it is a simple thing to store microsecond data as a decimal field. As far as dates, well, DB_Table does that too (but you won't like it ;-). DB_Table wants above all for the data itself to be portable across databases, not just the API calls. In a way, DB_Table proceeds similarly to MDB in this case: it retreats to the lowest common denominator in the name of portability. -- Paul M. Jones pmjones@ciaweb.net Savant: the simple alternative to Smarty. http://phpsavant.com/