C++, Cross Platform, Database, Free

Brian Dumas
Brian Dumas used Ask the Experts™
on
Hello Everyone,
  We have used C++ Builder for 13 years now developing libraries and tools that are used in the semiconductor test industry. So execution speed is essential. We've recently started looking forward, and have decided to move to an open source c++ environment and be as ready as possible to move to Linux if we need to. So, I've  ported some of our code to MinGw/MSYS on the Eclipse IDE. So far, not to bad. But the next step is database development (initially just to replace the various ways we read/write to the windows registry). Can MySQL be used on both Linux and Windows? Is MySQL free? The databases down the road don't look to cumbersome, so something as powerful as MSSQL is overkill. Besides that, the cost is a huge consideration. Or, are there other more compatible database platforms that are a better fit? Borland (Embaradaro) has been fantastic, but cost is now a premium, and our customers also use a c++ compiler, so we need to reduce the cost for us and them. ANY ideas/comments to this approach would be very useful and appreciated.

Thanks, BBrian
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2012
Commented:
>> Can MySQL be used on both Linux and Windows? Is MySQL free?

The 1st one is definitely answered "yes" (http://en.wikipedia.org/wiki/MySQL#Platforms_and_interfaces), the second also (http://en.wikipedia.org/wiki/MySQL#Support_and_licensing) since MySQL is dual-licensed. So, unless you need professional support, you can still go for the GPLed version. I'd also recommend taking a look at http://tangentsoft.net/mysql++/ which is a great C++ wrapper around the MySQL API.
>>> So execution speed is essential.
The level of execution speed importance will guide you to choose one or a combination of C and C++. its clear that C is faster but C++ is more easy to develop and maintain.

>>> Have decided to move to an open source c++ environment and be as ready as possible to move to Linux if we need to.
Congradulation on your decision. moving to opensource platforms is a great idea but you don't need to move to Linux if it's costly. you can use opensource development environment and run them on windows or MAC. But if you move to linux it will be the last step and will be great.

>>> So, I've  ported some of our code to MinGw/MSYS on the Eclipse IDE.
You can use Borland C++ in linux but it will not be an opensource environment so you can port your codes to ansi C++ or opensource environments like QT

>>> But the next step is database development (initially just to replace the various ways we read/write to the windows registry).
Read/Writes to Windows registry is not comparable to Database transaction you can change registry with other media such as files, pipes, etc. atabase transaction are too costly compared to simple textfile transactions.

>>> Can MySQL be used on both Linux and Windows? Is MySQL free?
As said jkr the answer to both of your questions is absolutely YES.


>>> Are there other more compatible database platforms that are a better fit?
There are other crosplatform opensource databases such as lightsql and postgresql but MySQL is the most powerfull when crossplatform excution is an important issue

>>> Borland (Embaradaro) has been fantastic, but cost is now a premium, and our customers also use a c++ compiler, so we need to reduce the cost for us and them. ANY ideas/comments to this approach would be very useful and appreciated.
In my opinion you better use Qt environment (qt.nokia.com/products) to develop your codes. Its opensource, fully crossplatform, and with high speed.
Some people prefer PostgreSQL http://www.postgresql.org/

Commented:
The future of MySQL as a free product is not so clear, since Oracle has bought Sun, that bough MySQL.
PostgreSQL is an alternative.
Also check the sqlite-3 (it's more embedded).
Commented:
> Can MySQL be used on both Linux and Windows?

Yes, and also (should you need it) on many more operating systems: FreeBSD, Solaris, Mac OS X,...


> Is MySQL free?

MySQL has dual licensing, a GPL license and a commercial one (this one including also the technical support). Since MySQL was bought by SUN Microsystems, which eventually was bought by Oracle, licensing variations might take place.
You ought to monitor the MySQL site:
http://www.mysql.com/


> are there other more compatible database platforms that are a better fit?

I like (actually, I prefer because of its robustness and the BSD license) PostgreSQL:
http://www.postgresql.org and the license is here:
www.postgresql.org/about/licence

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial