“a datatype with methods”. In a longer sentence, “a datatype with specific operations defined for it”
For example, a “student” datatype has fields representing the object’s state and and operations appropriate for a student such as enroll(courseID), payFees()….
This is a good example of the simplest type of class — a data class.
Another short answer — “a C struct with methods”
sproc? usually non-deterministic
table functions in db2? usually non-deterministic
simple scalar functions? usually deterministic
For every input data, if every time you pass the the input into this blackbox you always get consistent output, then …. deterministic
If you find some input data that could lead to inconsistent output, then …. non-deterministic
A: blob, clob and xml fields
in db2, a row can’t span pages, therefore some large fields get stored separate from the normal fields.
Q: what large fields?
a subq (sub-query or sub-select) can appear in 4 place within an outer query 
1) WHERE and 2) HAVING, the standard places
– derived-table in db2
– “inline-view” in oracle normenclature
4) among select-columns
5) case expressions
 not considering CUD commands
I wondered for a long time what this compilation is.
– parsing the query source into some query tree
– optimizer to prepare an execution plan and save it somewhere
* oracle’s in-line view
* table function — each returns an in-mem derived table
* sub-select in FROM — one of the 4 places. see another blog post.
* RAM — see another blog
* lasts for the query — see another blog
* replace some views and temp tables
storage: DT in RAM ;;;;; TT in user tablespace
– DT lasts for the query
– TT lasts for the sproc or the interactive session (ie connection)
DT exists only within a singe query ;;; TT is (always?) shared between statements.
When you insert lots of rows fast, you may want to turn off logging on a table.
When you create a table, often you want to turn off logging, but why?
When you hear people mention db2 “tablespace”, remember these 5 key points (knowledge pearls)
– each tablespace has its page size. page size affects many things including performance
– tablespaces are often named after the departments like Eq, FICC, Legal …
– a tablespace can hold many tables. I think a table can span tablespaces.
– the term “tablespace” means the same to db2 and oracle,
“fetch first 3 rows” appears after order-by, and is parsed after order-by too. It’s only logical.
As a result, all the where/having clauses are parsed before fetch clause.
Exception: “fetch first row only” is parsed earlier.