Most Important Interview Questions Flashcards
What is an atom?
An irreducible value of a specific data type.
What is a list?
An ordered collection of atoms/other lists.
What is a dictionary?
An association between a list of keys and a list of values.
What is a table?
An arrangement of information or data, typically in rows and columns. A q table is essentially a collection of named columns implemented as a dictionary.
What is a keyed table?
A table where one or more columns are keys, and the rest of the row’s information are the associated values similar to dictionary keys and value pairs.
How do you key a table?
(newKey) xkey (tableName)
What would you use to find the prevailing quote at the time of a trade?
Asof join
How would you select the sym column from a table in QSQL?
select sym from table
What is the difference between asynchronous and synchronous connections.
Async messages (neg) are similar to set. Request is sent to server, but the client does not wait for a result. Used when a result is not required by the client. Synchronous (similar to get) is used when a result is required by the client.
How do you calculate vwap?
select vwap: size wavg price from table.
What is fby?
Function by, used to apply a function and return selected columns only from a table, avoids creating an intermediary table.
What are the 5th and 6th arguments of functional select?
The 5th argument is the window used to select n specific rows from table. The 6th argument is the index specification argument used to select the indices wanted from the new table.
What is a compound column?
A column containing lists.
How to save to a compressed file?
Using set, with a left argument that specifies the target directory and right arguments are compression options.
How would you open a port connection in a server process and connect to it in a client process
-p 5000 or \p 5000
h: hopen 5000
Name all of the attributes?
Grouped, Unique, Parted, Sorted.
Name all of the joins.
Simple, Left, Inner, Union, Asof Join
Use fby in QSQL
Select from table where price>[avg;price] fby sym
What are foreign keys?
Foreign keys are enumerated lists used to link the enumeration to the original table in local memory???
What is the structure/layout of a partitioned table?
A partitioned database is saved as
db
dates
quotes
.d
price
…
What is in the .d file?
The .d file lists the columns in the order they appear in the table. It contains the schema of a splayed/partitioned table.
What is a sym file?
The sym file holds the unique symbols and their associated enumerations.
How would you load and save a csv?
read0: (zero read) :filedirectory to read csv in. save
:table.csv to save to csv
What is a use for sorted attribute?
Enables binary search, more efficient than linear search.
What is a use for parted attribute?
Usually applied to sym column on disk (#g in memory)