On Tue, 12 Sep 2006, Luiz Americo Pereira Camara wrote:

Michael Van Canneyt wrote:


Yes, they are. And there sqlite fails miserably. I wrote a series of
articles, comparing several embeddable databases:
 sqlite
 mysql
 firebird
 advantage
 nexusdb
And while sqlite had very good insert and simple select speeds, the speed
of complex queries (joining 2 tables) was a total disaster.
Can you show one or two examples of complexes sql queries, so i can add it to my fpc/TDataset benchmarks ?

SELECT
  COUNT(PU_ID) FROM
  PUPIL, PUPILTRACK WHERE
  (PT_PUPIL_FK=PU_ID)
  AND (PT_DATE='2005-09-06')
  AND (PT_CODE='I')
  AND (PT_TIME<='08:28:00');

SELECT
  COUNT(PU_ID) FROM
  PUPIL LEFT JOIN PUPILTRACK ON (PT_PUPIL_FK=PU_ID) WHERE
  (PT_DATE='2005-09-06')
  AND (PT_CODE='I')
  AND (PT_TIME<='08:28:00');

SELECT
  PU_ID,COUNT(PT_ID) from
  pupil left join pupiltrack on (PU_ID=PT_PUPIL_FK) GROUP
  BY PU_ID;

Thank you

Plus, and this is really what killed it for me: it does no type checking.
You can perfectly store a string in an integer field in sqlite; making it
impossible to use properly with TDataset.
It can be done, but you can get weird errors because MyIntField.AsInteger will
raise an exception of some other app stored a string in the integer.
Sqlite3 has improved in this field. In the next generation of TSqlite3Dataset this problem will not occur anymore.

Last time I checked, it was considered a 'feature', so I doubt the fundamental problem was solved.
I will solve inside TSqlite3Dataset. To see.

I don't see how you can do this ?

What should

  FieldByName('Intfield').AsInteger

return if the database contains
 'GarbageString'
in the 'IntField' field ?

I never understood what the big fuss is with sqlite. It's easy, yes, but not fit for enterprise use.
You are right. Even the sqlite developers/users know this. See http://www.sqlite.org/whentouse.html

QED :-)

Sorry. I dont understand QED

"Quod Erat Demonstrandum". It is latin for 'which was to be demonstrated'.

Usually found at the end of a mathematical proof.

Michael.

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to