Forums » .NET » ASP.NET »
Posted Date: 20 Jan 2010 Posted By:: Dhilip Member Level: Gold Member Rank: 652 Points: 1
what is the differene between table and view.give me with some examples.
|#465316 Author: Girish Dindukurthy Member Level: Gold Member Rank: 959 Date: 20/Jan/2010 Rating: Points: 2|
Table : Relational Database is composed of tables that contain related data.
1. Views are created from one or more than one table by joins with selected columns.
2. Views acts as a layer between user and table.
3. Views are created to hide some columns from the user for security reasons and to hide information exist in the column.
4. Views reduces the effort for writing queries to access specific columns every time.
5. Reports can be created on views.
6. View doesn't contain any data.
|#465329 Author: Asheej T K Member Level: Diamond Member Rank: 2 Date: 20/Jan/2010 Rating: Points: 2|
A table is where you store your data and it occupies space on disk.
View is a virtual table.
Asheej T K
|#465344 Author: Kolan Member Level: Gold Member Rank: 59 Date: 20/Jan/2010 Rating: Points: 2|
View is a virtual table where as a table is where you store your data and it occupies some space in disk.
|#465576 Author: Christopher F Member Level: Gold Member Rank: 172 Date: 20/Jan/2010 Rating: Points: 2|
A Table is a repository of data, where in the table itself is a physical entity. The table resides physically in the database.
A View is not a part of the database's physical representation. It is precompiled, so that data retrieval behaves faster, and also provide a secure accessibility mechanism.
See code example below:
Create table T_EMPLOYEE
(Emp_Id integer primary key,
Say there is a scenario where Salary is not to be shown to a group of users, a View may be created to display allowable information:
Create view EMP_SOME_DETAILS
(Select Emp_Id, Name, Skillset, DOB
The advantages of using a view are as follows:
- It may access data from a table, multiple tables, view, multiple views, or a combination of these
- A view connects to the data of its base table(s).
- Provides a secure mechanism of data accessibility
Synonym is alternate name assigned to a table, view, sequence or program unit.
- It may be used to shadow the original name and owner of the actual entity
- Extends the reach of tables, by allowing public access to the synonym
| ||This thread is locked for new responses. Please post your comments and questions as a separate thread.|
If required, refer to the URL of this page in your new post.
Active MembersTodayLast 7 Daysmore...
Talk to Webmaster Tony John