Hacker News new | ask | show | jobs
by nivertech 1132 days ago
That's because kdb tables are much more similar to R dataframes (ordered maps of vectors), rather than to relational algebra used in RDBMS/SQL (logically sets of rows). That's for in-memory only (RDB), ignoring historical data (HDB) and persistence since kdb is a real database.

  // kdb+/q
  t: ([] sym:`AAPL`IBM`GOOG; price: 139.09 124.23 948.82; vol: 123456 98765 54321)

  # R
  df <- data.frame(sym=c("AAPL", "IBM", "GOOG"), price=c(139.09, 124.23, 948.82), vol=c(123456, 98765, 54321))