Database View vs Database Table
People think a view is a copy of a table, and it is not. A table holds rows of its own on disk. A view holds no rows at all. It is a saved query with a name, and it runs fresh each time you read it. Change a row in the table, and the view shows the change at once.
Database View
A saved query you can read from as if it were a table.
A database view is a saved query that you can use as if it were a table. It stores no data of its own. Each time you read from it, the database runs the query behind it. Views hide hard joins behind a simple name, and they can show some columns while hiding others. You read from a view with SELECT, just like a table.
Database Table
One kind of data in a database. It is set out in rows and columns.
A table is where a database keeps one kind of thing, like customers or orders. It has columns, which say what each record holds, and rows, which are the records. Every row in a table has the same columns. A database usually has many tables that point to each other. Choosing good tables is the first step in designing a database.
In one line
- Database View
- A saved query you can read from as if it were a table.
- Database Table
- One kind of data in a database. It is set out in rows and columns.