Simulating functionality of sql (or other rdbms) using stl/boost algorithms and containers

407 views Asked by At

I've been using stl for a while but i'm just getting to know sql.

Can sql functionality be simulated using stl/boost containers and algorithms? if not, where do the limitations start?

for example, I could create a database by simply using std::vector<std::unordered_map<std::string>> or even better with boost multi-index.

then, the sql operations can be mimicked with algorithms:

  • WHERE -- std::copy_if
  • JOIN -- std::set_union

It may be possible to do the optimization of the queries using lazy evalluation.

I do understand that sql is not in ram. but it's not that important if database is not that big. plus, there is also stxxl.

So my question is mainly about when do you stop using stl/boost and switch to sql?

0

There are 0 answers