|
|
Forums » .NET » ASP.NET »
Posted Date: 20 Jan 2010 Posted By:: Dhilip Member Level: Gold Member Rank: 652 Points: 1
Responses:
5
|
Dear all, what is the differene between table and view.give me with some examples.
Regards, Dhilip
|
Responses
|
#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.
View :
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.
Regards, Asheej T K Microsoft MVP[ASP.NET/IIS] DotNetSpider MVM
Dotnet Galaxy
| #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, Name varchar2(50) Skillset varchar2(200), Salary number(12,2), DOB datetime);
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 as (Select Emp_Id, Name, Skillset, DOB From T_EMPLOYEE);
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
|
|
| Post Reply |
|
|
|
 | | 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
|