Re: [metabase-dev] RE: [PEAR] New MDB questions

From: Date: Wed, 06 Aug 2003 02:35:55 +0000
Subject: Re: [metabase-dev] RE: [PEAR] New MDB questions
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7036@lists.php.net to get a copy of this message
Hello, On 08/05/2003 08:05 AM, Lukas Smith wrote:
Qsts: _In general, what's the maximum number of characters a text field can take? If the text field can't accept 10 000 chars, should I use clob or
blob? Difficult question. If you are taling about that kind of numbers you should use clobs.
In case of doubt, use character lob fields if you expect them to be larger than 255 characters. If you expect the fields to hold many MB, do not use the database at all, use the filesystem instead, unless you are using databases that provide good lob data streaming support like Oracle, PostgreSQL and a few others. Forget using multi-megabyte lob fields with databases like MySQL or Microsoft SQL server because these require that you paste the field values in the query string, making it very slow, if it doesn't blow your PHP memory limit first. LOB support of Microsoft SQL server and all those based on ODBC is horrible not only because it requires the data to be inserted in the query string, but also because it has to be hex encoded, thus using twice as much the space in the query as it takes in the database. Overall all, LOBs are nice to keep all your data in the database server but usually storing the data in regular files is much more efficient.
_My ratings are quite high precision numbers (6 decimals). Should I
use
float or a decimal-fixed decimal field?
You are aware of the basic differences between floats and decimals I assume? Generally I don't know a good answer to this one though. Maybe Manuel Lemos from the Metabase project can give you an answer here?
Use fixed precision decimal fields when you want to deal with numbers that you can't loose accuracy in calculations. This is is usually the case when you are dealing with money. -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/

« previous php.pear.general (#7036) next »