Chapter 5. Views and Virtual Columns

Sometimes, we may want to shift some data logic from an application to the database. In order to do this, we can use two important features called views and virtual columns. These are objects that can be seen as tables or columns that are automatically populated with the data calculated by MariaDB. These features can also be used to add security to our database, or to solve some performance problems.

This chapter will cover the following topics:

  • Views
  • VIRTUAL columns
  • PERSISTENT columns

Views

A view can be thought of as a virtual table. It is a query that has been saved in a database with a name. The rows returned by the saved query can be seen as table contents, and the set of columns that form the result set can ...

Get MariaDB Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.