How to store blockchain data If I wanted to imprint the blockchain data on a database, with the purpose of performing complex or just different than the RPC-based queries, how would I do it? Would I have to go for a relational database or a NoSQL one? Eventually the database would be filled with hundreds of millions of records, which databases would perform well (respond quickly) to these gigantic numbers?
If you settle for a relational DB you can try BitcoinDatabaseGenerator.
https://github.com/ladimolnar/BitcoinDatabaseGenerator/releases
Sources and wiki: https://github.com/ladimolnar/BitcoinDatabaseGenerator

It may take you a few hours (it takes me 90 minutes but that will vary depending on your hardware and configuration) to transfer the blockchain files to the DB.

If you do that take a look at the views that are already defined in the DB, some of them may be useful to you.