License Issue with MySql

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 3980
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 27 times
Been thanked: 168 times

Re: Licence Issue with MySql

Post by Roberto Lopez » Sat Sep 12, 2009 2:12 pm

rathinagiri wrote:Now, in this regard, what about the rival PostgreSQL's position?
According Wikipedia it uses BSD license, that apparently is less-restrictive than GPL:
Proprietary software licenses compatibility

The BSD License allows proprietary use, and for the software released under the license to be incorporated into proprietary products. Works based on the material may be released under a proprietary license or as closed source software. This is the reason for widespread use of the BSD code in proprietary products, ranging from Juniper Networks routers to Mac OS X.[4]
It is possible for something to be distributed with the BSD License and some other license to apply as well. This was in fact the case with very early versions of BSD itself, which included proprietary material from AT&T.
Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

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

Post by Rathinagiri » Sat Sep 12, 2009 3:16 pm

Thanks for the info Roberto.

Then, we shall try to use that too.

I had not personally used MingW+ Harbour + PostgreSQL. Is there anybody using them? Easy to use?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
Roberto Lopez
HMG Founder
Posts: 3980
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 27 times
Been thanked: 168 times

Post by Roberto Lopez » Sat Sep 12, 2009 4:04 pm

rathinagiri wrote:Thanks for the info Roberto.

Then, we shall try to use that too.

I had not personally used MingW+ Harbour + PostgreSQL. Is there anybody using them? Easy to use?
Harbour includes a PostgresSql RDD (apparently incomplete).

This text is found in code:

Code: Select all

/*
 * This is an experimental RDD for xharbour/contrib/pgsql interface.
 * It has been created to test the possibilities of usrrdd.
 * It doesn't support many functions and commands and many things could be optimized.
 */
I've was advised about potential BCC licensing issues and convenience of using MingW by Lorenzo Fiorini (RDD author).

He help me a lot on porting HMG to MingW too.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

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 » Sat Sep 12, 2009 6:43 pm

Hello Master Roberto, Friends Rathi, Swapan and all other friends,

Thank you very much for this discussion. This will help us to choose between two excellent RDBMS :)

This may be little off the track but, I read in some documents (about 6 years old, and may be things have been changed) about MySql and PGSql. http://www.databasejournal.com/features ... better.htm As per the discussion,

1) MySql is faster than PGSql, especially when PGSql is installed in default mode.
2) PGSql has more (better? I don't know) facilities, like data integration, stored procedures, trigger depth etc.

But, now PGSql is trying to be faster and MySql is trying to add more features :)

Regarding Licensing, I found,
Licensing

PostgreSQL comes with a BSD-style license, which fits the Free Software Definition and Open Source Definition, and conforms to both the Debian Free Software Guidelines and the Copyfree Standard.

MySQL's source code is available under terms of the GNU General Public License, which also fits the Free Software and Open Source definitions and conforms to the Debian Free Software Guidelines (but not to the Copyfree Standard). It is also available under a proprietary license agreement, which is typically intended for use by those who wish to release software incorporating MySQL code without having to release the source code for the entire application. In practical terms, this means that MySQL can be distributed with or without source code, as can PostgreSQL, but to distribute without source code in the case of MySQL requires paying MySQL AB for a MySQL Commercial License.

Even the MySQL client library is GPL (not LGPL), which means that to use (and therefore link to) the MySQL client library the program must either itself be GPL, must use one of a broad range of FOSS licenses including BSD and LGPL, or must have a commercial license from Sun.
You may found a detailed comparison between 2 products at http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL

A few months back I looked TPostGreSql library functions for Harbour and found that, we can easily port our existing MySql code for harbour (and HMG :) ) to PGSql.

Again, please correct me if I am wrong :)

Again, what about Sqlite? Will it work for small to medium sized database application with 3/4 users?

With best regards.

Sudip
With best regards,
Sudip

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

Post by Rathinagiri » Sat Sep 19, 2009 3:07 am

In this regard, we can consider FireBird too! http://www.firebirdsql.org

Something to know about firebird from their site:

Firebird is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. Firebird offers excellent concurrency, high performance, and powerful language support for stored procedures and triggers. It has been used in production systems, under a variety of names, since 1981.

The Firebird Project is a commercially independent project of C and C++ programmers, technical advisors and supporters developing and enhancing a multi-platform relational database management system based on the source code released by Inprise Corp (now known as Borland Software Corp) on 25 July, 2000.

FREE LIKE A BIRD. Anyone can build a custom version of Firebird, as long as the modifications are made available, under the same IDPL licensing, for others to use and build on.

FREE LIKE FREE BEER. No fees for download, registration, licensing or deployment, even you distribute Firebird as part of your commercial software package.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

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 » Sat Sep 19, 2009 3:58 pm

Rathi,

Thanks a lot for this information. I just checked Firebird web site. It looks very good. Only, I'm thinking about the performance!!! (http://www.firebirdfaq.org/cat6/)
I also found that it's a multiuser database.
Will it work on Harbour and HMG?

So for our medium to big projects we have Postgres, Firebird (without licensing problem ) And hope we can use it with minor modification of your "Micro Kernel" (Sql.prg) !!! :lol:

With best regards.

Sudip
With best regards,
Sudip

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

Post by Rathinagiri » Sat Sep 19, 2009 4:21 pm

sudip wrote:Rathi,

Thanks a lot for this information. I just checked Firebird web site. It looks very good. Only, I'm thinking about the performance!!! (http://www.firebirdfaq.org/cat6/)
I also found that it's a multiuser database.
Will it work on Harbour and HMG?

So for our medium to big projects we have Postgres, Firebird (without licensing problem ) And hope we can use it with minor modification of your "Micro Kernel" (Sql.prg) !!! :lol:

With best regards.

Sudip
Yes, Firebird is a blend of both MySQL and SQLite. It is running on client/server concept. But the database is stored in a single file! You have to give login and password details before entering into the database. :)

Further libhbfbird.a is already included in the HMG distribution. The only thing is we have to make our usual bridge to Firebird.

Here is the sample file to access firebird db from harbour contribution.

Code: Select all

/*
 * $Id: test.prg 8659 2008-06-08 10:22:37Z vszakats $
 */

#include "common.ch"

Function Main()
   LOCAL cDir, cName
   LOCAL cDBName
   LOCAL nDialect := 1

   LOCAL trans, qry

   hb_FNameSplit( hb_argv( 0 ), @cDir, @cName, NIL )
   cDBName := hb_FNameMerge( cDir, cName, ".gdb" )
   
   if File( cDBName )
       FErase( cDBName )
   endif
   
   ? FBCreateDB(cDBName, 'sysdba', 'masterkey', 1024, 'ASCII', nDialect )
   
   /* Connect rdbms */
   db := FBConnect("127.0.0.1:" + cDBName, "sysdba", "masterkey")
   
   if ISNUMBER(db)
      ? 'Error'
      quit
   endif
   
   ? FBExecute(db, 'sldjfs;ldjs;djf', nDialect)
   
   ? FBClose(db) 
   
   trans := FBStartTransaction(db) 
   qry := FBQuery(db, 'create table teste (code smallint)', nDialect, trans)
   FBCommit(trans)
   
   
   ? "Status Execute: ", FBExecute( db, 'insert into customer(customer) values ("test 1")', nDialect, trans)
   
   ? "Status no Rollback: ", FBRollback(trans) 
   
   trans := FBStartTransaction(db)
   ? "Status Execute: ", FBExecute( db, 'insert into customer(customer) values ("test 2")', nDialect, trans )  
   ? "Status commit: ", FBCommit(trans)
   
   
   ? "Status Execute: ", FBExecute( db, 'insert into customer(customer) values ("test 3")', nDialect )
   
   // FIX WINDOWS GPF BELOW
   
   qry := FBQuery(db, "SELECT * FROM sales", nDialect) 
   
   num_cols := qry[4]
   columns := qry[6]
   
   For x := 1 to num_cols
      ? x, "> "
      For y := 1 to len(columns[x])
          ?? columns[x,y], ' '
      Next
   Next
    
   ? '---'
   
   do while (fetch_stat := FBFetch(qry)) == 0
      ? fetch_stat
      for x := 1 to num_cols
          ?? FBGetData(qry,x), ', '    
      next 
   enddo
   
   ? 'Fetch code:', fetch_stat
   
   ? "Status Free sql: ", FBFree(qry)
   
     
   /* Close connection with rdbms */
   ? "Status Fechar Database: ", FBClose(db)
 
   Return Nil
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

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 » Sat Sep 19, 2009 6:08 pm

Rathi,
Thanks for the information. I checked \Harbour\Contrib\hbfbird\tfirebrd.prg. It's a gold mine :)
Regards.
Sudip
With best regards,
Sudip

Post Reply