Friday, April 10, 2009

MySQL: The Sequel

For a long time, we provided direct support for MySQL in REALbasic via a plug-in. Then, due to some concerns about the way MySQL is licensed, we decided to leave the MySQL plug-in to the community to avoid any unnecessary complications. Since then, many of you have made it clear to us that you really want us to directly support MySQL. We looked into the licensing issue and came up with a solution. Support for MySQL will return with REALbasic 2009 Release 2.

For those of you wondering what the license issue is, allow me to explain. There are two editions of MySQL: the MySQL Community Server and the MySQL Enterprise Server. The MySQL Community Server is the free edition of MySQL. It is open source and falls under the GNU General Public License or GPL for short. Basically, if code is released under the GPL, it means that anything that uses that code is also automatically GPL'd. Our new MySQL Community Server plug-in communicates with the MySQL Community Server via the Community Edition library provided by MySQL. That library was released under the GPL which means our MySQL Community Edition plug-in is also GPL'd. That also means that if you use this plug-in in your application, most likely, your application will be GPL'd and you will be required to provide the source code to the public. I'm not a lawyer, so before you make any decisions, you should check the MySQL web site for details, read over the GPL and consult with your attorney.

The MySQL Enterprise Server is NOT released under the GPL and it is NOT free. It's a commercial product. Soon we will be releasing a separate, non-GPL plug-in specifically for the MySQL Enterprise Server. If you want to use MySQL and want to make sure that you don't have to GPL your application, you will probably want to purchase a license for MySQL Enterprise Server. Again, I'm not a lawyer so you should check the MySQL web site and discuss this with your attorney.

To be clear, this is not a REALbasic or REAL Software licensing issue. This is strictly a MySQL licensing issue. The libraries they provide for use with these editions come with the restrictions I have summarized above. MySQL is very popular and part of the reason is that people believe it's free. As you can now see, that's not 100% true and it's not 100% false either. It really depends on your situation.

Warning: Shameless Plug Ahead

If you are building an application and need a database server, another consideration is our REAL SQL Server that has as one of its advantages, crystal clear licensing.


Anonymous said...

It's great that RS is supporting these options again. It is unfortunate that MySQL licenses their lib this way.

So what we really need is someone to step up and build a clean room implementation of the current MySQL protocol using a TCPSocket so we don't have to include any of their software and talk to either server without the GPL issues... :)

Geoff Perlman said...

That would then require a lot of testing and maintenance and it could break with each release of MySQL. If you don't want to pay for a database server and don't want the GPL issues, there are alternatives such as Postgres.

However, if you want to avoid the GPL issues and are willing to pay for a database server, take a look at REAL SQL Server. And take an even harder look at REAL Server 2009 when it's released.

Anonymous said...

I love REAL SQL Server and all but my cursory glance of the built in features seem way shadowed by the power of MySQL's abundant functions.

I think the real trick around this is to develop two applications, one that runs in the background (console maybe) and then interface your non-GPL'ed app with the background app, sending your queries and results between the apps. You may have to surrender the source to the background app but thats not a huge deal.

Geoff Perlman said...

That's a very clever way to get around the GPL. However, the middleware would slow down your app all to avoid the GPL. I'm not sure it's worth it.

MGV said...

No, it would be worth doing.

I use sqlite in my very simple databases, and really, its a shockingly primitive database that has very little documentation.

If I had tried to learn it from scratch, I would have failed. Its really only because I knew enough SQL (from using microsoft products) that I could figure out what to do. That, and the rather excellent sqlite plugin for firefox, which makes the capabilities of RB look primitive.

I still don't understand why RB actually bothers with Sqlite. How about a database that actually understands what a date is, or can actually alter tables (eg to drop a field) after they have been created?

To try and build a commercial engine around this makes no sense to me.


Unknown said...

@george or michael; whatever names you use for trolling lol

many "big" companies uses sqlite, including apple for mail. most people know that already.

you absolutely need to alter tables because you don't know what you are doing ?

what's primitive is your way to see things. maybe you spend too long with ms products ? any better idea except sqlite ? agreed the doc is not that good, but does your end-user cares ?

Anonymous said...

@Troll I mean George or Michael

You know what I like the most about SQLite? The primitiveness as you call it. It's simple but does the job I require it to do. In fact the more I use it the more I like it.

MGV said...

Firstly - George is my middle name - commonly used by my friends - but it just happened to be the username that got me onto google/blogger. My full name is Michael George Veltman.

I find it amazing that people who post anonymously accuse me of trolling. In a sense, they have trolled me, because its getting a response right now - so I'd call that a successful troll on their part.

I own a licence to real basic professional, actually expired Nov last year, but I'm looking at renewing. I maintain a couple of (small) programs using real basic.

I won't be renewing for the studio product. I did give it some thought, but at the end of the day I cannot see the point in the studio.

Real software is obviously sinking a lot of money into developing this, and perhaps I can see why in relation to all the licencing issues outlined above. For me however the issue is that I would rather have a more functional system than one that scales.

I personally will not benefit from a SQL server until it can dish out web pages too. I know about HTTPsocket, I've written to RealSoftware about this, but I'm not a web designer, and there is not much point for me in separating the SQL server from the code until the server is more functional.

Ok, my situation is perhaps unusual. But perhaps it isn't. I used to write stuff in VB, but for a variety of reasons I develop on a mac now (but run the executables on a PC). Real Basic serves my needs better than any other alternative, if only because I don't have to buy a windows box to do this.

Anyway, to get back on topic, this whole real SQL server may be useful for enterprise level development. I'm not sure how many people develop at this level AND use real basic.

For me, I would rather that they put more features on the database, or at least on the RB front end to it. Like, as I have said, real date fields.

The fact that I have to write a lot of code simply to handle dates properly, and have to convert between a date object and a string field to save that date is wasted coding time.

Its just one example, and this isn't the right forum to put my rants on about RB in general (such as how they even handle the date object), but at least if the database could be consistent with the data objects used then this would be a good thing (in my opinion).

Which was, and is, my point.

Oh, and better documentation would not be a bad thing either for the database. Trying to find out how to do a nested inner join on the database from the documentation was my latest frustration...


Airshift Media said...

I don't quite get it what is the point of having 'real' date data type. Whatever the database is, we always use sqldate and sqldatetime anyway since otherwise it will be a big mess when users access from various timezones and so on. Also I don't understand how it can be a big problem to construct a date from sqldate.

Anyway, as addition to the issue of GPL there is another issue on mySQL. It is not always clear for the customers when the community edition can be installed and when they should by a commercial license. That's why the enterprise -plugin is quite mandatory since I assume you wouldn't be able to connect enterprise version using the community plugin?

Naturally there is always another option: to use ODBC instead of native interface.

Anonymous said...

I have been using REAL SQL Server since it's first release. I have 2 databases that contain 40 GB of data. Yes, 40 gigabytes! I had to learn a little, but the queries are virtually instantaneous. The reason I choose REAL SQL Server is the simple client encryption.

I have users that connect over the internet and have you ever tried to create a standalone windows app that connects to *ANY* database server with encryption (without having the end user do *anything* at all)? With RSQLS it is nothing at all to setup.

Additionally, I played around with MY SQL, Postgre, MS SQL Server Express and even Valentina. In the end, I found that my time is much better utilized building software than learning how to use a database server. You cannot imagine how simple it is to get RSQLS up and running. Literally 10 minutes.

On top of all that...I have *never* once had a problem with the software. Marco Bambini even replied to me once directly via email when I posted a bug report (during beta) and he thanked me and fixed the bug within 24 hours.

REAL Software said...

Can you please contact me at I'd be interested in hearing more of your story and writing a case study about your use of REAL SQL Server.


Tomas Sancio said...

Although George has a point in that SQLite is limited, RealBasic is not the only development platform that uses SQLite internally. Both Apple and Adobe use it. Apple uses it for its Core Data part of the Cocoa API and Adobe uses it for file handling in Air applications. Their reason must be that it's open source with no strings attached.

I just used the RealBasic version for internal file handling and quick querying and it worked just fine. In my case, I only needed to create simple tables.

For the rest, I'm looking forward to using the MySQL plugin. I've looked at Real SQL Server and when I have the chance, it will depend on the customer(s) whether I end up using one or the other. They're both free for development and charge for deployment, where you are more likely to pass the costs onto your clients.


Anonymous said...

[quote]Soon we will be releasing a separate, non-GPL plug-in specifically for the MySQL Enterprise Server.[/quote]
Are you able to give us an approximate timescale for this?

Geoff Perlman said...

I can't give you a time line yet but it should be fairly soon.