adonisjs / rfcs

💬 Sharing big changes with community to add them to the AdonisJs eco-system
52 stars 6 forks source link

Add option to create database views as we do with tables #14

Closed begueradj closed 5 years ago

begueradj commented 5 years ago

Brief history

Unlike relational tables which store data, views store predefined queries that return a result set, and since they look like regular tables we also called virtual tables.

What problem does it solve?

Views have several advantages, the one I appreciate more is that they improve database security and integrity given the fact we can use them to display only the columns we want to particular users, for example.

Proposal

Until now, migrations deal only with tables. I think we should add the possibility to create views also.

Relevant links

https://www.w3schools.com/sql/sql_view.asp