DBFCDX or SQLite

Moderator: Rathinagiri

Tristan
Posts: 40
Joined: Sun Jul 19, 2009 2:15 pm

DBFCDX or SQLite

Post by Tristan » Wed Oct 14, 2009 2:11 am

Hi All,

Which better HMG+DBFCDX or HMG+SQLite ? :)

Regards,
Tristan

User avatar
mol
Posts: 3247
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 230 times
Been thanked: 132 times
Contact:

Post by mol » Wed Oct 14, 2009 5:43 am

With DBF you have no problem with record locking in multiuser environment.
You have date and logic fileds.
SQLite - fine, if you want use SQL and have all data in one file.

I didn't test for speed.

Marek

User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 1 time

Post by sudip » Wed Oct 14, 2009 10:17 am

Hi Tristan,

Thanks a lot :)
You have started the hottest topic of my choice :)
In my first message I am writing points for DBFCDX (and in next message I shall write for SQLite)

PROS:
1. Easy to create.
2. Native database for HMG (more specifically Harbour/xHarbour), like Access for VB and MS Sql for VB.Net. (Please correct me if I am wrong)
3. No extra load.
4. Runs very fast.
5. Store good amount of data.
6. We can use standard good old xbase commands.

CONS:
1. Database is easily corrupted.
2. No security feature.
3. Each table is a file. I get confused with so many files. This is my very humble personal opinion. Some of my expert friends like this feature. :)
4. We can't use SQL commands. There is an exception - VFP, where we can use SQL commands with DBF/CDX. Again some of my expert friends may differ. But, in my very humble personal opinion - sometimes SQL is more efficient both in execution time and code size (especially for queries, reports etc.)

There are so many points, which don't come to my mind right now ;)
Again, I regard myself as a learner of HMG. So, those points may be wrong.

You may find following link helpful viewtopic.php?f=15&t=853&start=9

With best regards.

Sudip
With best regards,
Sudip

User avatar
mol
Posts: 3247
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 230 times
Been thanked: 132 times
Contact:

Post by mol » Thu Oct 15, 2009 5:46 am

Using DBFCDX, you can easily browse huge tables -size doesn't matter.
Using SQLite - you must create array in memory - I've reached exhaustion in my test while converting DBF (something about 40MB) to SQLITE, so you can present only range of database.
maybe I'm wrong, but I think - DBF's are very easy and work fine. In my apps, corruption od DBF doesn't happened fro years. Sometimes, it's necessary to rebuild indexes.

User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 1 time

Post by sudip » Thu Oct 15, 2009 6:42 am

Yes Marek, you are absolutely correct :) I may differ in one point. I faced several cases data corruption for my clients with Clipper apps and VFP apps. But, since one year when I converted my Clipper apps to x/Harbour. I didn't face this problem too much :)
I must say that using DBFCDX with HMG is easier than any Sql database. But this may be changed if we have good SQLRDD (I haven't tested HMG 3.0.0 IV SQLRDD yet).

There is one point which I got from Roberto Lopez. If we can port our app to Sqlite, we can port it into many big, client server RDBMS, like MYSQL, PostGreSQL (till now I can't use PostgreSQL with HMG) etc. This scalability issue is a very good point.

We can't use transaction facility with DBFCDX (till now).

Again, IMHO, DBFCDX is record based where SQL is set based. So, for query SQL database should be more efficient :)

Please, write your valuable views. It will be extremely helpful for me :)
Rathi, I need your views also :)

With best regards.
Sudip
With best regards,
Sudip

User avatar
mol
Posts: 3247
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 230 times
Been thanked: 132 times
Contact:

Post by mol » Thu Oct 15, 2009 10:18 am

I agree with you.
Changing from DBF to SQL requires change of thinking of data.
Besides, world trend is for SQL

hkrasser
Posts: 16
Joined: Fri Jul 10, 2009 12:08 pm
Location: Austria

Post by hkrasser » Mon Feb 01, 2010 8:32 pm

Hello Sudip!
Hello Mol!
Unfortunately I do not have knowledge in SQL and theoretical background as you both.
I have read, that DBFCDX creates more traffic because a lot of (index) information is ordered from the server. This could be a problem in lange LANs.
I work in a small company with less then 10 clients. Typical problems are converting article data and condensing data.
When I tested the time for indexing 50k of articles ist lastet about 0.3 seconds.
So for my special situation I think DBFCDX ist the best solution.
Best regards! Hans

User avatar
Hazael
Posts: 109
Joined: Thu Jun 24, 2010 11:37 am
Location: France

Post by Hazael » Wed May 15, 2013 9:38 am

I would say that SQLite is more elegant and I believe it can replace DBF with some advantage in most cases.
Just my personal opinion.
Harbour | GTWVT | MingW | Visual Studio Code

User avatar
fouednoomen
Posts: 95
Joined: Sun Oct 14, 2012 8:33 am
DBs Used: DBF,MySql
Location: Tunisia
Been thanked: 1 time

Post by fouednoomen » Wed May 15, 2013 3:50 pm

Dear All ,

I just finish to Migrate from clipper to Hmg ,
I have a big Application with more than 50 simultaneous users and more than 30 dbf files
with more than 1 Gb as size , with DBFCDX it's run Very well with a good server but i have
a security problem , so for this reason i think to migrate to a database system .

i don't knows what i should take as database system ( sql lite or my sql or ...) and the volume of job to migrate ,

i need your help for the best /fast solution and the easy way to migrate without many changes


Regards

Foued

User avatar
Rathinagiri
Posts: 5264
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 169 times
Been thanked: 172 times
Contact:

Post by Rathinagiri » Wed May 15, 2013 4:06 pm

For 50+ simultaneous users SQLite is out.

Your options are mysql or postgreSQL or firebird.

Now a days I use MariaDB which is a drop in replacement for MySQL with full open source license.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

Post Reply