Tuesday, November 01, 2005

Why PostgreSQL?

I wrote a post titled "Why MySQL?" a while back explaining why I had chosen MySQL to be the database for my software (more explanation on the software here).

Essentially, I was looking for something that was as cheap as possible. MySQL is free if you use it for private purposes.

And, to store tick data, as you can download from Gain Capital's website for example, you need an industrial-strength database application. Microsoft Access won't cut it. It can only grow up to 2Gb.

While Microsoft offers a scaled-down low-cost version of its SQLServer, the very fact that it's scaled-down again means it's not big enough for my purposes.

The problem with MySQL is that if you want to make a commercial application, as mine is turning into (in a "let's run it up the flagpole" kind-of-way), suddenly a licence per machine costs about US$600. Meaning anyone who actually wanted to purchase my software would have to fork out $600 to MySQL, *and then* I could add my price on top of that.

Fortunately, someone read my original post and told me of PostgreSQL. A completely free industrial-strength database application. Reading a bit more about it found that it's a very close competitor to MySQL - superior in some ways, not in others. But completely free. And so I decided to use that.

That left me with the huge task of migrating my code to connect with PostgreSQL instead of MySQL. They are not huge changes, just a lot of them. And then I thought, hey, instead of replacing the MySQL code with PostgreSQL, why don't I *add* the PostgreSQL code. Then, people could decide which database they wanted to use.

Some people might already have paid the $600 to MySQL. If I completely swapped to PostgreSQL, I'd be forcing them to install another industrial-strength database application on a machine that already had one. Sure, computers these days are quite powerful, but you don't really want two of the things installed if you can help it.

And then I thought, hey, *I* want to store tick data but maybe some people are quite content to store daily data. In that case, Microsoft Access will work just fine. Or the cut-down version of Microsoft's SQLServer. And then if I've made the software able to connect to the cut-down version of SQLServer, I dare say it'll work just fine with SQLServer itself.

Today I came across yet another completely free database application called SQLite.

So, if you've already got any of these database applications on your machine, you'll (very hopefully because I haven't actually started making code changes yet) be able to use the Thinking Stuff software with it.

Be warned, however, that I have not checked into the specific licencing terms given by Microsoft and MySQL for when shipping commercial software that "can use" those products, as opposed to software "specifically for" those products. It could be the case that a fee is still required, albeit smaller.

A very quick recap on the software that I'm making (and have been making for oh-my-god way too long now): It's automated trading software. But, you don't need to know or learn any programming languages in order to use it (e.g. TradeStation's EasyLanguage, WealthLab's WealthScript, MetaTrader's MQL, etc). All trading systems are created by selecting rules from pull-down menus. Once you've created a system you can backtest it. And then you make it trade in your demo account. And then when you're completely satisifed, you make it trade in your real account. To be compatible with Gain Capital, Forex.com, Interactive Brokers, Oanda, plus any others that provide an API. Currently only for forex, but hoping to move to stocks, futures, as well. Hoping to release a Beta version ("Beta" meaning you can use it, but expect bugs, and tell me about the bugs when they happen) in early to mid December.

My Christmas present to myself will be to get the darn thing finished :-) And if nobody buys it, well, I made it for myself anyway.

3 Comments:

mehanizator said...

I use MySQL too, but I never planned to make my soft a commercial application, I've made it for myself.

Wed Nov 02, 07:19:50 AM EST  
TraderEyal said...

Do you need any beta testers? :)

Wed Nov 02, 09:11:00 AM EST  
Sharky said...

To be sure Trader Eyal, to be sure. Especially those with existing accounts with, oh I don't know, Interactive Brokers? :-)

Wed Nov 02, 11:25:48 AM EST  

Post a Comment

<< Home