MongoDB

Learn how to interface Rust with MongoDB, one of the leading NoSQL databases.

What is MongoDB?

We have already seen how to interface with an SQLSQL database. Over the years, the SQL standard has been the principal and perhaps the only database standard used. Recently, however, a surge in data consumption and the need to handle nonstructured data have given rise to the so-called NoSQL databases. We have already seen one such database, Redis, which is nonstructured and in-memory.

MongoDB is another popular choice, particularly when the data to be stored is closer to a JSON structure than to an SQL table. In an SQL database, the information is organized in tables with columns.

The user structures the data in tables, ...