firebird + HMG

Moderator: Rathinagiri

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

Re: firebird + HMG

Post 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.
Last edited by Hazael on Thu Sep 04, 2014 7:16 pm, edited 1 time in total.
Harbour | GTWVT | MingW | Visual Studio Code
User avatar
edufloriv
Posts: 238
Joined: Thu Nov 08, 2012 3:42 am
DBs Used: DBF, MariaDB, MySQL, MSSQL, MariaDB
Location: PERU

Re: firebird + HMG

Post 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

Eduardo Flores Rivas


LIMA - PERU
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: firebird + HMG

Post 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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
skonuk
Posts: 28
Joined: Fri Sep 17, 2010 7:37 pm
Location: turkey-bursa

Re: firebird + HMG

Post 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)


.. ..
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: firebird + HMG

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
mol
Posts: 3727
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: firebird + HMG

Post 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!
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: firebird + HMG

Post 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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: firebird + HMG

Post 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...).
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
skonuk
Posts: 28
Joined: Fri Sep 17, 2010 7:37 pm
Location: turkey-bursa

Re: firebird + HMG

Post by skonuk »

LOCAL cServer := "localhost:"
LOCAL cDatabase
LOCAL cUser := "SYSDBA"
LOCAL cPass := "masterkey"
User avatar
serge_girard
Posts: 3173
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: firebird + HMG

Post 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
There's nothing you can do that can't be done...
Post Reply