Difference between view and table

Questions by sbagai2001   answers by sbagai2001

Showing Answers 1 - 31 of 31 Answers

Difference between a view and a base relation: -

Views:
1. This is one type of relation which is not a part of the physical
database.
2. It has no direct or physical relation with the database.
3. Views can be used to provide security mechanism.
4. Modification through a view (e.g. insert, update, delete) generally
not permitted

Base Relation:
1. A base relation is a relation that is not a derived relation.
2. While it can manipulate the conceptual or physical relations stored
in the data.
3. It does not provide security.
4. Modification may be done with a base relation.

We can assign the view, a name & relate it the query expression as
Create View <View Name> as <Query Expression>
Let EMPLOYEE be the relation. We create the table EMPLOYEE as follows:-

Create table EMPLOYEE
(Emp_No integer of null,
Name char (20),
Skill chars (20),
Sal_Rate decimal (10, 2),
DOB date,
Address char (100),)
For a very personal or confidential matter, every user is not
permitted to see the Sal_Rate of an EMPLOYEE. For such users, DBA can
create a view, for example, EMP_VIEW defined as:-

Create view EMP_VIEW as
(Select Emp_No, Name, Skill, DOB, Address
         From EMPLOYEE)

  Was this answer useful?  Yes

Asim Jamal

  • Jun 6th, 2006
 

A VIEW is only a mirror image of table which is used at places where

large access to a table is required.

Views cannot be updated,deleted and modified but we could select data

from views easily.

  Was this answer useful?  Yes

Mohan Cherin

  • Jun 29th, 2006
 

Table - Storage Unit Contain Rows and Columns

View -  Logical Subset of Tables

pkarthikkumar

  • Aug 16th, 2006
 

View

View is an Database Object we can use DML it affects the base table and view.we can create a object for that table.

Table

we cant use that to be a object, It use for store the data  only and manipulate the data.

  Was this answer useful?  Yes

opbang

  • Sep 22nd, 2006
 

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.

sowjanya

  • Sep 24th, 2006
 

  For data hiding to users from the data table we use views. Views stores only a  particular query.Whenever we call that view it executes that query only. It does not store any data.We can also get some attributes of a table as view.

  Was this answer useful?  Yes

its_saru

  • Oct 18th, 2006
 

  View is different perspective to see output from a table.

  View data can not take part in Manipulation.

  We can update or delete view. 

  Was this answer useful?  Yes

N. Mahadevan

  • Nov 23rd, 2006
 

View is nothing but a query file which stores the Sql Query, which is similar to the query file in Foxpro. When executed the query returns the rows from the tables specified in the query which satisfies the conditions (to a dynamic virtual table which has the column names specified in the query). That is why each an every time the view displays different result set depending on the data in the table.

channabasava

  • Aug 27th, 2011
 

We can create a view with base table and can able to execute DML(insert , delete,update and select ) statements


if we update view then the base table get updated....

Code
  1. CREATE TABLE a

  2. ( id int,

  3. name CHAR(20))

  4.  

  5. SELECT * FROM a

  6.  

  7. INSERT INTO a

  8. VALUES(50,'e');

  9.  

  10. CREATE VIEW a1 AS SELECT * FROM a

  11.  

  12. SELECT * FROM a1

  13.  

  14.  

  15. INSERT INTO a1

  16. VALUES(200,'ase');

  17.  

  18. DELETE FROM a1 WHERE id=100

  19.  

  20. UPDATE a1

  21. SET name='xyz'

  22. WHERE id=10;

  23.  

  24.  

  Was this answer useful?  Yes

Raj sr

  • Sep 8th, 2012
 

In view also update, delete, insert fuctions possible only if it satisfies view condition.

  Was this answer useful?  Yes

fayaz ahmad khan

  • Sep 23rd, 2013
 

View is used for simplicity and for security of a table in simply a query can also called a view and a stored query which is used a lot of time then it can waste our time so a view is used to reduce a time confusion

  Was this answer useful?  Yes

mudassir

  • Mar 26th, 2014
 

i have created VIEW in oracle with more than one table and i tried to delete the record by using the command "delete viewname where fieldname = 3 and the record is get delete. Can you plz explain why this happed

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions