Board index » delphi » Re: Suggestoins for Local DB to use with Shareware

Re: Suggestoins for Local DB to use with Shareware


2006-05-01 05:52:40 AM
delphi114
"Wayne Niddery [TeamB]" <XXXX@XXXXX.COM>writes
Quote

Do you use table access or SQL queries? Access has a very proprietary SQL
dialect (like date strings enclosed with '#') and has some limitations on
joins among other things. These days, while there still remains many
differences between products, most agree on enough (like date strings)
that one can write fairly complex SQL that is portable across many
database products, but will fail under Access.

The ADO driver handles most of those translations for you. The changes you
have to make aren't any more difficult than those found in moving between
say, Sybase or SQL Server and Oracle (where dates also have to be handled
differently). In fact, I have found more problems moving between Sybase and
Oracle than between MS Access and either of the other two.
My question about Access would be based on the poster's comments about the
number of insert transactions and the amount of data being stored. I think
Access does much better with high traffic databases now than several years
ago but it still isn't a heavy duty RDBMS like Oracle, Sybase or SQL Server.
Ray
 
 

Re: Suggestoins for Local DB to use with Shareware

I.P. Nichols writes:
Quote

SELECT * FROM Orders WHERE OrderDate=DateValue('11/16/1994')
Which is no more portable to other systems than #11/16/1994#.
But
SELECT * FROM Orders WHERE OrderDate='11/16/1994'
is compatible with every *other* SQL system I know of (any that follow even
just the basics of SQL89/SQL92 standards).
--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: www.logicfundamentals.com/RADBooks.html
"The purpose of morality is to teach you, not to suffer and die, but to
enjoy yourself and live." - Ayn Rand
 

Re: Suggestoins for Local DB to use with Shareware

"Wayne Niddery writes:
Quote
I.P. Nichols writes:
>
>SELECT * FROM Orders WHERE OrderDate=DateValue('11/16/1994')

Which is no more portable to other systems than #11/16/1994#.
Not did I say it was!! In point of fact it is used for another reason, not
portability.
Quote
But
SELECT * FROM Orders WHERE OrderDate='11/16/1994'
is compatible with every *other* SQL system I know of (any that follow
even just the basics of SQL89/SQL92 standards).
So you would have everyone just totally reject the use of MS Access in favor
of ?
Oh, let me guess... ;-)
 

Re: Suggestoins for Local DB to use with Shareware

"Wayne Niddery [TeamB]" <XXXX@XXXXX.COM>writes
Quote
But
SELECT * FROM Orders WHERE OrderDate='11/16/1994'
is compatible with every *other* SQL system I know of (any that follow
even just the basics of SQL89/SQL92 standards).

Nope, that wouldn't work with Oracle. That was one of the biggest shocks to
me when I switched from Sybase to Oracle. In Oracle, you have to use the
TO_DATE function to tell Oracle that the string you're supplying is a date
and you have to tell it which date format you're using. In Oracle, the
statement would be:
SELECT * FROM Orders WHERE OrderDate = TO_DATE('11/16/1994', 'mm/dd/yyyy');
This quirk along with the lack of a currency data type drove me crazy when I
first started with Oracle.
Ray Porter
 

Re: Suggestoins for Local DB to use with Shareware

I seem to recall that Access has serious issues when any table
approaches 500,000 records. Data corruption and other problems, IIRC.
I.P. Nichols writes:
Quote
G. Bradley MacDonald writes:
>Arthur - good question - but I have had issues with Access in the past.
>Maybe it was me - but I'd be worried about choosing this.

Pardon me for jumping in but as an enthusiastic user of Access's mdb
database files, I am very interested in learning what issues you have
experienced and would greatly appreciate if you could elaborate as what
happen, were you using Delphi's ADO support and what vintage Access.

Many thanks...


 

Re: Suggestoins for Local DB to use with Shareware

"Graham" writes:
Quote
I seem to recall that Access has serious issues when any table approaches
500,000 records. Data corruption and other problems, IIRC.
I'm not aware of a limit on the number of records except as imposed by the
max size of 2 GB. You can confirm specifications at this URL:
office.microsoft.com/en-us/assistance/HP051868081033.aspx
With that said, storing and manipulating 500,000 or more records, assuming
the data has some value, isn't the sort of thing one does lightly in any
desktop database without due consideration for robustness. However I have
had good success with an Access database that contained some 200,000+
records and I was well pleased with the speed of queries and never
experienced any data loss or corruption.
Over the years I have heard many stories of problems with Access...
Quote

I.P. Nichols writes:
>G. Bradley MacDonald writes:
>>Arthur - good question - but I have had issues with Access in the past.
>>Maybe it was me - but I'd be worried about choosing this.
>
>Pardon me for jumping in but as an enthusiastic user of Access's mdb
>database files, I am very interested in learning what issues you have
>experienced and would greatly appreciate if you could elaborate as what
>happen, were you using Delphi's ADO support and what vintage Access.
>
>Many thanks...
>
 

Re: Suggestoins for Local DB to use with Shareware

Quote
>I am looking for suggestions for a good local DB for our shareware app.

Why not use the Microsoft OleDB provider for Access(Jet4) databases?
It is installed on most pc's anyway and its SQL syntax is pretty complete.
No royalties etc involved.
Access is great for small single user databases. In addition to the reasons
you mentioned, the whole database is stored in a single file (which has
obvious benefits) and the MS Access program itself is a very conventient
schema designer, data explorer, query builder tool.
The only things I don't like about using an access databases are:
1. The jet database engine is a total memory hog. Run a few queries and you
will see it chew up 20-30mb of memory on a fairly small database.
2. Access is open format so to speak because of it is driver ubiquity which
means you can not really hide data from users. I guess this can be bad or good
depending on the application. For some projects I have wanted to hide data
from users so they do not mess with it using an external app - something
that can not be done effectively if using access.
 

Re: Suggestoins for Local DB to use with Shareware

Quote
Hello

Not a problem. Exactly what I was using was a while ago - so I am not
positive. It was with D3 - I was using the BDE at the time. The access
was slow (probably because of the BDE layer) and it didn't seem to
handle the large number of inserts without issues (I honestly can't
remember exactly what they were now - but I'd get messages from
access about problem with the inserts after about 300,000).
I have also had access run out of locks while performing updates involving
large numbers of records in a transaction. Perhaps that is the same error
you encountered (although I am pretty sure it only happened on updates and
not inserts).
I found the only way to avoid the error (besides the registry hack to
increase lock counts) was to avoid doing large updates in a transaction or
to open the database in exclusive mode.
 

Re: Suggestoins for Local DB to use with Shareware

"Jacob" writes:
Quote
The only things I don't like about using an access databases are:

1. The jet database engine is a total memory hog. Run a few queries and
you will see it chew up 20-30mb of memory on a fairly small database.
Usually this sort of thing is a trade off between memory and speed...
Quote
2. Access is open format so to speak because of it is driver ubiquity which
means you can not really hide data from users. I guess this can be bad or
good depending on the application. For some projects I have wanted to hide
data from users so they do not mess with it using an external app -
something that can not be done effectively if using access.
There is a password protection feature built into MS Access which I usually
use by embedding the password in the Delphi app. By no means the world's
best security but it does keep casually nosey people from being able to mess
with the data.
 

Re: Suggestoins for Local DB to use with Shareware

"Ralf Mimoun" writes:
Quote
Wayne Niddery [TeamB] writes:
...
>But
>SELECT * FROM Orders WHERE OrderDate='11/16/1994'
>is compatible with every *other* SQL system I know of (any that
>follow even just the basics of SQL89/SQL92 standards).

Wich is a source for trouble, guaranteed. Other countries, other settings.
Your "11/16/1994" would be "16.11.1994" here in Germany. you will have some
difficulties to write some text only scripts that work everywhere. If you
ask me, the only clean solution for a db system is to use ANSI formatted
date, time and float values. Some time ago, DBISAM switched from local
format to ANSI (from version 2 to 3, iirc). From that moment on, the
questions in the Elevate newsgroupgs about date formatting, trouble using
date x for language y etc. just disappeared almost over night. It was one
of the best decision they made. They provide conversion functions
(AnsiFloatToStr etc), of course.
Exactly! In MS Access this is handled by it is built in SQL DateValue()
function, which I referred to in my response to Wayne's comment, but didn't
explain why I preferred to use it. It respects the Country Format Settings
of Windows so that in the USA one would use
OrderDate=DataValue('11/16/1994') and in Germany
OrderDate=DateValue('16.11.1994') so that the WHERE clause in the above
SELECT will find the desired records.
 

Re: Suggestoins for Local DB to use with Shareware

Wayne Niddery [TeamB] writes:
<< But
SELECT * FROM Orders WHERE OrderDate='11/16/1994'
is compatible with every *other* SQL system I know of (any that follow even
just the basics of SQL89/SQL92 standards).>>
The standard datetime literals are clear and unambiguous:
DATE'1994-11-16'
TIME'00:00:00'
TIMESTAMP'1994-11-16 00:00:00'
Ole Willy Tuv
 

Re: Suggestoins for Local DB to use with Shareware

Ingvar Anderberg writes:
Quote
"Fikret Hasovic" <XXXX@XXXXX.COM>skrev
>G. Bradley MacDonald writes:
>>Any suggestions?
>
>Firebird embedded!!!
>
>But check this out too:
>
>
>fhasovic.blogspot.com/2005/05/delphi-unit-to-embed-firebird-i
>nto-exe_17.html
>
>fhasovic.blogspot.com/2005/05/delphi-unit-to-embed-firebird-i
>nto-exe.html
>
>P.S. Latest version is on first link ;-)


Talk about embedded:
Firebird + App on a USB stick <g>

www.fyracle.org/showstory.php
BTW, I have version 2.0 of fb_embedded, and that version never extract
fb engine files on disk, but in memory stream ;-)
In that case, complete engine is in memory, and only DB file is on disk
;-)
--
Best regards,
Fikret Hasovic fikret.fbtalk.net
USAID TAMP Senior Programmer
* Firebird Foundation member. - Join today at
www.firebirdsql.org/ff/foundation
* Firebird and Fyracle news www.fyracle.org
* JEDI VCS contributor jedivcs.sourceforge.net/
Posted with XanaNews 1.18.1.3
 

Re: Suggestoins for Local DB to use with Shareware

"Ralf Mimoun" <XXXX@XXXXX.COM>writes
Quote
Hi!
All integrated db systems I know use their own tabkle components. In
DBISAM, it is TDBISAMTable (and TDBISAMQuery). I don't think that there is
anything working with Borlands TTable components.
Hmmm, I didn't think anybody used TTable or its derivatives anymore. At
least not for anything other than maybe a quick mock-up or prototype.
-Trevor
 

Re: Suggestoins for Local DB to use with Shareware

Well the SQL standard is actually quite clear on this with the DATE keyword
and the ANSI value.
--
Hannes Danzl [NexusDB Developer]
Newsgroup archive at www.tamaracka.com/search.htm
 

Re: Suggestoins for Local DB to use with Shareware

Quote
Hmmm, I didn't think anybody used TTable or its derivatives anymore. At
least not for anything other than maybe a quick mock-up or prototype.
Well, i guess the best performance for a database application you can only get
with the right method for the task. Both, SQL and direct cursor access both
have their advantages and disadvantages.
--
Hannes Danzl [NexusDB Developer]
Newsgroup archive at www.tamaracka.com/search.htm