In fact,
This is, in fact, wrong. A relational database like mysql, oracle, SQL server, etc... , unlike R, does not keep entire data set in memory, unless you are using a memory table, which is a special case..., but only a limited amount of data, based index configuration, db settings...