KDB+ Architecture
Q Programming Language
- Q - Message Handler (.Z Library)
- Q - Inter-Process Communication
- Q Language - Queries
- Q Language - Built-in Functions
- Q Language - Functions
- Q Language - Joins
- Q Language - Verb & Adverbs
- Q Language - Table
- Q Language - Dictionaries
- Q Language - Indexing
- Q Language - Lists
- Q Language - Temporal Data
- Q Language - Type Casting
- Q Programming Language
Q Advanced Topics
- Q Language - Maintenance Functions
- Q Language - Tables on Disk
- Q Language - Table Arithmetic
- Q Language - Functional Queries
- Q Language - Attributes
KDB+ Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
KDB+ Overview
This is a complete quide to kdb+ from kx systems, aimed primarily at those learning independently. kdb+, introduced in 2003, is the new generation of the kdb database which is designed to capture, analyze, compare, and store data.
A kdb+ system contains the following two components −
KDB+ − the database (k database plus)
Q − the programming language for working with kdb+
Both kdb+ and q are written in k programming language (same as q but less readable).
Background
Kdb+/q originated as an obscure academic language but over the years, it has gradually improved its user friendpness.
APL (1964, A Programming Language)
A+ (1988, modified APL by Arthur Whitney)
K (1993, crisp version of A+, developed by A. Whitney)
Kdb (1998, in-memory column-based db)
Kdb+/q (2003, q language – more readable version of k)
Why and Where to Use KDB+
Why? − If you need a single solution for real-time data with analytics, then you should consider kdb+. Kdb+ stores database as ordinary native files, so it does not have any special needs regarding hardware and storage architecture. It is worth pointing out that the database is just a set of files, so your administrative work won’t be difficult.
Where to use KDB+? − It’s easy to count which investment banks are NOT using kdb+ as most of them are using currently or planning to switch from conventional databases to kdb+. As the volume of data is increasing day by day, we need a system that can handle huge volumes of data. KDB+ fulfills this requirement. KDB+ not only stores an enormous amount of data but also analyzes it in real time.
Getting Started
With this much of background, let us now set forth and learn how to set up an environment for KDB+. We will start with how to download and install KDB+.
Downloading & Instalpng KDB+
You can get the free 32-bit version of KDB+, with all the functionapty of the 64- bit version from
Agree to the pcense agreement, select the operating system (available for all major operating system). For Windows operating system, the latest version is 3.2. Download the latest version. Once you unzip it, you will get the folder name “windows” and inside the windows folder, you will get another folder “q”. Copy the entire q folder onto your c:/ drive.
Open the Run terminal, type the location where you store the q folder; it will be pke “c:/q/w32/q.exe”. Once you hit Enter, you will get a new console as follows −
![KDB+ Console](/kdbplus/images/kdbplus_console.jpg)
On the first pne, you can see the version number which is 3.2 and the release date as 2015.03.05
Directory Layout
The trial/free version is generally installed in directories,
For pnux/Mac −
~/q / main q directory (under the user’s home) ~/q/l32 / location of pnux 32-bit executable ~/q/m32 / Location of mac 32-bit executable
For Windows −
c:/q / Main q directory c:/q/w32/ / Location of windows 32-bit executable
Example Files −
Once you download kdb+, the directory structure in the Windows platform would appear as follows −
![KDB+ Example Files](/kdbplus/images/kdbplus_example_files.jpg)
In the above directory structure, trade.q and sp.q are the example files which we can use as a reference point.
Advertisements