4. Views and Stored Programs

MySQL supports several types of server-side objects. These are objects that you create and the server stores for later execution.

Views are one type of stored object. A view is a virtual table. That is, it acts like a table but actually contains no data. Instead, it is defined in terms of tables or other views and provides alternative ways to look at table data. Views can make application development easier by providing a simple way to run complex queries.

Stored programs are another type of stored object. These come in several forms. Some can be invoked on demand. Others execute automatically when table modifications occur or when a scheduled time is reached:

• A stored function returns a result from a calculation ...

Get MySQL, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.