Page 2 of 3

Re: firebird + HMG

Posted: Thu Sep 04, 2014 9:45 am
by Hazael
IMHO these are some advantages that I personally like on Firebird:
  • 1) It's really free without hidden conditions and fully Open Source (MySQL isn't like that although I believe MariaDB is).
    2)Each database is located in one independent file (I particularly don't feel confortable with MySQL / DBF because of those many files)
    3) The instalation is very easy and works on most operating systems
    4) Backup and replication is easy and powerful even with the database in use
    5) Active community - very hospitable like HMG ;)
    6) Fully supports referencial integrity (Seems that MariaDB supports is partially) (Source: http://en.wikipedia.org/wiki/Comparison ... ems#feat_3)
    7) Data domain (I like this one to help standarize the fields through the whole application)
    8) You can create and use an embedded database (serveless kind of like SQLite)
    9) Multi-generation architeture (readers don't lock writers)

    See also: http://www.firebirdsql.org/en/features/" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;

Disadvantages:
  • 1) No encryption (I mean something like SQLCipher for SQLite but for Firebird)
    2) It's pretty easy to open and see the data if you have physical access to the database (encryption would help here)
    3) Doesn't automatically clean garbage/shadow left from unswept deletions. The only way is by a full backup/restore. It may affect the performance
    4) Documentation is pretty confusing and spreaded in different files although I don't really need complex features and for the basic things it's pretty cool.

    Probably there are other disadvanges that I didn't find yet...
Rathinagiri said:
IMHO, MariaDB is better than FireBird in simplicity.
Could you please explain more about that? I would appreciate it.

Re: firebird + HMG

Posted: Thu Sep 04, 2014 4:51 pm
by edufloriv
Oooo.....

This seems to be turning into a versus. Now I have curiosity. What is better FireBird or MariaDB. It would be nice the opinion of someone who has tried both.


Best regards,



Eduardo Flores Rivas
LIMA - PERU

Re: firebird + HMG

Posted: Thu Sep 04, 2014 6:48 pm
by Rathinagiri
Friends, this is my opinion only. May be opinions of experts may differ.

1. In this cloud world, it doesn't matter if my database file is a single file or a group of files. It is the matter of the server which handles the same. It is up to the DataBase Administrator to take backup and other preventive and corrective measures against any eventuality.

2. MariaDB is a simple replacement of MySQL. In the case of HMG, libmysql.dll is enough to connect with MySQL/MariaDB data.

3. MySQL is widely used in most of the web servers. Deployment is simple and easy.

4. With regard to security, MySQL is also equally unsecured if the server is compromised. Otherwise it is ok.

5. It is platform independent. (can be installed in Windows/Linux etc)

6. Well documented.

Re: firebird + HMG

Posted: Tue Sep 23, 2014 10:54 pm
by skonuk
for example :

connect firebird database

#require "hbfbird"


cDatabase := "C:\fairway\DATABASE\FBTEST.FDB"
db := FBConnect( cServer + cDatabase, cUser, cPass )
IF HB_ISNUMERIC( db )
MSGINFO("Error (Fbconnect):"+FBError( db ),"Hata")
QUIT
endif


sql data to grid items example code :

qry := FBQuery( db, "SELECT STOK_ID, STOK_KOD, STOK_AD, STOK_BRM, STOK_FYT, STOK_KDV FROM STOK WHERE STOK_KOD LIKE '%"+STNO+"%' ORDER BY STOK_KOD", nDialect)

IF HB_ISNUMERIC( qry )
MSGINFO('Hata:'+FBERROR(QRY))
RETURN NIL
ENDIF

DELETE ITEM ALL FROM GRID1 OF &(XFORM)

DO WHILE ( fetch_stat := FBFetch( qry ) ) == 0
ADD ITEM vAL(FBGETDATA(QRY,1)),FBGETDATA(QRY,2),FBGETDATA(QRY,3),FBGETDATA(QRY,4),VAL(FBGETDATA(QRY,5)),VAL(FBGETDATA(QRY,6))} TO GRID1 OF ARAWINDOW
ENDDO
FBFREE(QRY)


INSERT RECORD SAMPLE WITH AUTO-ID COLUMN :


query="INSERT INTO CARI (CARI_KOD,CARI_UNVAN,CARI_ADRES,CARI_VDAD,CARI_VDNO) VALUES"
query=query+"("+c2sql(ckod)+cv+c2sql(cunv)+cv+c2sql(cadr)+cv+c2sql(cvda)+cv+c2sql(cvdn)+") returning CARI_ID"

qry:=FBQUERY(db,query,ndialect)
IF HB_ISNUMERIC( qry )
MSGINFO(FBERROR(QRY))
else
DO WHILE ( fetch_stat := FBFetch( qry ) ) == 0
CID=(FBGETDATA(qry,1)) && NEW RECORD ID.
enddo
fbfree(qry)
MSGINFO('Yeni Kayıt Yapıldı...!')

ADD ITEM {VAL(CID),CKOD,CUNV,CADR,CVDA,CVDN} TO GRID1 OF &(XFORM)


.. ..

Re: firebird + HMG

Posted: Wed Sep 24, 2014 9:22 pm
by Roberto Lopez
Rathinagiri wrote:IMHO, MariaDB is better than FireBird in simplicity.
Does MariaDB needs a client dll (like libmysql.dll)?

If yes, is there any way to avoid it (ie: a client library to be linked with our exe)?

I'm asking since (AFAIR) libmysql.dll has some distribution/licensing restrictions (I'm not fully sure).

TIA.

Re: firebird + HMG

Posted: Thu Sep 25, 2014 5:39 am
by mol
skonuk wrote:for example :

connect firebird database

#require "hbfbird"


cDatabase := "C:\fairway\DATABASE\FBTEST.FDB"
db := FBConnect( cServer + cDatabase, cUser, cPass )
IF HB_ISNUMERIC( db )
MSGINFO("Error (Fbconnect):"+FBError( db ),"Hata")
QUIT
endif


sql data to grid items example code :

qry := FBQuery( db, "SELECT STOK_ID, STOK_KOD, STOK_AD, STOK_BRM, STOK_FYT, STOK_KDV FROM STOK WHERE STOK_KOD LIKE '%"+STNO+"%' ORDER BY STOK_KOD", nDialect)

IF HB_ISNUMERIC( qry )
MSGINFO('Hata:'+FBERROR(QRY))
RETURN NIL
ENDIF

DELETE ITEM ALL FROM GRID1 OF &(XFORM)

DO WHILE ( fetch_stat := FBFetch( qry ) ) == 0
ADD ITEM vAL(FBGETDATA(QRY,1)),FBGETDATA(QRY,2),FBGETDATA(QRY,3),FBGETDATA(QRY,4),VAL(FBGETDATA(QRY,5)),VAL(FBGETDATA(QRY,6))} TO GRID1 OF ARAWINDOW
ENDDO
FBFREE(QRY)


INSERT RECORD SAMPLE WITH AUTO-ID COLUMN :


query="INSERT INTO CARI (CARI_KOD,CARI_UNVAN,CARI_ADRES,CARI_VDAD,CARI_VDNO) VALUES"
query=query+"("+c2sql(ckod)+cv+c2sql(cunv)+cv+c2sql(cadr)+cv+c2sql(cvda)+cv+c2sql(cvdn)+") returning CARI_ID"

qry:=FBQUERY(db,query,ndialect)
IF HB_ISNUMERIC( qry )
MSGINFO(FBERROR(QRY))
else
DO WHILE ( fetch_stat := FBFetch( qry ) ) == 0
CID=(FBGETDATA(qry,1)) && NEW RECORD ID.
enddo
fbfree(qry)
MSGINFO('Yeni Kayıt Yapıldı...!')

ADD ITEM {VAL(CID),CKOD,CUNV,CADR,CVDA,CVDN} TO GRID1 OF &(XFORM)


.. ..
What to set to cServer value?

Thanks for sample!

Re: firebird + HMG

Posted: Thu Sep 25, 2014 9:27 am
by Rathinagiri
Roberto Lopez wrote:
Rathinagiri wrote:IMHO, MariaDB is better than FireBird in simplicity.
Does MariaDB needs a client dll (like libmysql.dll)?

If yes, is there any way to avoid it (ie: a client library to be linked with our exe)?

I'm asking since (AFAIR) libmysql.dll has some distribution/licensing restrictions (I'm not fully sure).

TIA.
Yes, MariaDB is a drop-in replacement for MySQL. So, it requires libmysql.dll. MariaDB is having a full community edition. So, IMHO, distribution restrictions would not be there.

However, we can try to include libmysql.dll in .a form.

Re: firebird + HMG

Posted: Thu Sep 25, 2014 3:28 pm
by Roberto Lopez
Rathinagiri wrote:
Roberto Lopez wrote:
Rathinagiri wrote:IMHO, MariaDB is better than FireBird in simplicity.
Does MariaDB needs a client dll (like libmysql.dll)?

If yes, is there any way to avoid it (ie: a client library to be linked with our exe)?

I'm asking since (AFAIR) libmysql.dll has some distribution/licensing restrictions (I'm not fully sure).

TIA.
Yes, MariaDB is a drop-in replacement for MySQL. So, it requires libmysql.dll. MariaDB is having a full community edition. So, IMHO, distribution restrictions would not be there.

However, we can try to include libmysql.dll in .a form.
Again, I'm not fully sure (I hate licensing things :) ) but I guess that the only way to avoid licencing restrictions is if MariaDB team creates its own libmysql.dll version. I'll try to find more info about this...

EDIT: This link provides some information on that:

https://mariadb.com/kb/en/mariadb/devel ... ary-32358/

EDIT2: Basically, to avoid licensing problems, you should use 3.23 version of mysql client library or MariaDB C client library, but in this case, we should find a way to compile it for our MingW version and then create Harbour wrappers (I guess...).

Re: firebird + HMG

Posted: Fri Sep 26, 2014 5:46 pm
by skonuk
LOCAL cServer := "localhost:"
LOCAL cDatabase
LOCAL cUser := "SYSDBA"
LOCAL cPass := "masterkey"

Re: firebird + HMG

Posted: Sat Sep 27, 2014 8:19 am
by serge_girard
To Roberto:

When I do an install or distribution of a new release I do it in two 2 steps:
- first EXE will check existence of libmysql.dll. If necessary it will download it to the right place ( GetSystemFolder() --> C:\WINDOWS\SYSTEM32 or C:\WINDOWS\SYSTEMwow64)
- second EXE then gets new EXE or whatever from the database

This works fine for more than 2 years.


Greetings,

Serge