Databases and models

Models represent data that is either stored or passed around. Generally speaking, models do not need to be connected to a database. In some cases, you may need a model just as another representation of data you have in another model already.

On the other hand, models are also a great tool to load data in and out of the database. One of the most desired and even most powerful features of Vapor is its Object-Relational Mapping (ORM): Fluent.

In the next two sections, you will explore Fluent as well as its supported databases.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.177.14