Introduction to SQL and mongoDB and how to use them from R