Scan and Over – iterating through lists

One of the first things I was told by my ex boss was to never use for/while loops unless it’s a matter of life and death. And he was dead serious. I had just taken two c++ classes in college so wasn’t sure how I would be able to replace for/while loops. They are easy …

qSQL queries for performing analytics

I realize that there are many developers out there that are not looking to get into q completely and are simply using q/kdb+ along with qsql to perform analytics (i.e. quants). My job requires all of this so I have some good experience running qsql queries. Of course, the type of query you need to …

Moving data from one hdb to another

I work in a market data team that captures and stores market data, calculates statistics and then provides both the raw data and stats to our clients according to their needs. We handle both real-time and historical data. In an ideal world, you will never have to worry about your historical data but many times, …

How data is saved in a historical database

Real-time databases are easy to understand as everything is happening in memory. Historical databases are a different story. Recently, I have been getting much more involved with hdbs at work and just the way they work is incredible and fascinating to me. If you are serious about kdb+, you should make sure to know how …

Overview of kdb+ architecture

So far, I have covered quite a few intermediate topics without covering the basics. In this post, I would like to take a step back and talk about general architecture of kdb+. A simple kdb+ setup includes a feed handler (fh), a ticker plant (tp), a real-time database (rdb), and a historical database (hdb). These processes work …