O'Reilly logo

D Web Development by Kai Nacke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Accessing a Database

Every web application needs a persistent storage. Depending on your needs, you can choose between different types of databases. The vibe.d framework has built-in support for MongoDB and Redis, and a native MySQL library is available as an external DUB package. The note application is extended in order to use each of these databases.

In this chapter, we will cover the following topics:

  • What are the different types of databases and their advantages and disadvantages
  • How to connect and use the Redis key-value store
  • How to connect and use the MongoDB document database
  • How to connect and use the MySQL relational database

Choosing the right database technology

Before extending the note application, let's take a look at the different ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required