Q: biz logic implemented where?
A: beans representing db entities.
Q: explain the many-to-one:
A: first many-to-one means many of this (OrderItem) linked to one
order. ANY link like this requires a link-column/join-column, which is
optimizer modes — rule, choose, first_rows(?), all_rows …
all_rows && first_rows are for CBO
* all_rows perhaps suit batch jobs — resource efficiency(?)
* first_rows perhaps suit OLTP — fast response
If compiler detects an abstract method, the (“host”) class must be declared abstract.
I think this is the only difference between abstract class and non-abstract class.
U can convert a non-abstract class into abstract by adding the keyword “abstract” to the class. All attributes are left alone. Yes, an abstract class can CONTAIN instance-level fields as well as static (ie class-level) members.
Correlated/uncorrelated sub-queries and joins are blood brothers and often simultaneously usable to solve a given problem. A few non-obvious differences.
* subquery — clearer than joins
sub query may look unfriendly compared to joins, but actually the logic is easier to make out.
* uncorrelated — most readable
Uncorrelated is usually *simpler* than joins or correlated.
* uncorrelated — fast
b’cos one nested scan only. Correlated (not uncorrelated) can hurt performance because it could involve one scan per value “passed in”
Uncorrelated requires just one execution of the sub query.