Tables are physical database objects that store data in rows and columns, while views are virtual tables based on SQL query results that do not store data. Views enhance security and simplify complex queries but may have performance drawbacks compared to tables. There are two types of views: Simple Views, which are based on a single table and allow DML operations, and Complex Views, which are based on multiple tables and may not always allow DML operations.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
5 views2 pages
What is the difference between View and Table
Tables are physical database objects that store data in rows and columns, while views are virtual tables based on SQL query results that do not store data. Views enhance security and simplify complex queries but may have performance drawbacks compared to tables. There are two types of views: Simple Views, which are based on a single table and allow DML operations, and Complex Views, which are based on multiple tables and may not always allow DML operations.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
What is the difference between View and Table.
Feature Table Views
Definition A database object that stores A virtual table based on the data in rows and columns result of a SQL query Storage Physically stores data in the Does not store data, retrieves database data dynamically Data Modification Supports INSERT, UPDATE, Supports modification only if it DELETE operations meets certain conditions Performance Faster as data is stored Slower because data is fetched permanently dynamically Security Needs explicit permissions for Provides an extra layer of access security by restricting access to underlying tables
What is view? State the types of View.
A view is a virtual table in a database that provides a way to present data from one or more tables using a SQL query. It does not store data itself but retrieves data dynamically when accessed.
Benefits of Views:
• Simplifies complex queries
• Enhances security by restricting access to specific columns or rows
• Provides abstraction and hides underlying table structure
• Helps in maintaining consistency in data retrieval
Types of Views
1. Simple View
o Based on a single table
o Does not contain functions, joins, or group operations
o Allows DML operations (INSERT, UPDATE, DELETE)
2. Complex View
o Based on multiple tables
o Can contain joins, aggregate functions, and GROUP BY
o May not always allow DML operations
What is the difference between Simple View and Complex View.
Feature Simple Views Complex Views
Based on Single table Multiple table Contains joins No Yes Aggregates & Grouping No Yes Modifiable Yes Not Always Performance Faster May be slower due to joins and aggregations