GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 85 of 171    Print  
What are the advantages and disadvantages of View?

  
Total Answers and Comments: 9 Last Update: April 26, 2007     Asked by: sbagai2001 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 02, 2006 14:10:41   #1  
Mohan        

RE: What are the advantages and disadvantages of View?...

Hi

Advantages of views:

1. View the data without storing the data into the object.

2. Restict the view of a table i.e. can hide some of columns in the tables.

3. Join two or more tables and show it as one object to user.

4. Restict the access of a table so that nobody can insert the rows into the table.

Disadvatages:

1. Can not use DML operations on this.

2. When table is dropped view becomes inactive.. it depends on the table objects.

3. It is an object so it occupies space.

Pls. add if I miss any of them.

Thanks

Mohan


 
Is this answer useful? Yes | No
June 23, 2006 01:31:20   #2  
abhinav28 Member Since: May 2006   Contribution: 1    

RE: What are the advantages and disadvantages of View?...

hi

Just to add ..Views don't consume space as they are created dynamically ...ex- when you do select * from view_name ;


 
Is this answer useful? Yes | No
June 28, 2006 05:57:26   #3  
sippsin Member Since: June 2006   Contribution: 6    

RE: What are the advantages and disadvantages of View?...
You can update (DML) a table through a view if the view is created using a single table. If the view is created using multiple tables then if the tables are normalised using constraints you could update those tables too through the view.
 
Is this answer useful? Yes | No
June 28, 2006 06:08:15   #4  
sippsin Member Since: June 2006   Contribution: 6    

RE: What are the advantages and disadvantages of View?...

The inline view is a construct in Oracle SQL where you can place a query in the SQL FROM clause just as if the query was a table name.

select
fs.tablespace_name Tablespace
(df.totalspace - fs.freespace) Used MB
fs.freespace Free MB
df.totalspace Total MB
round(100 * (fs.freespace / df.totalspace)) Pct. Free
from
(select
tablespace_name
round(sum(bytes) / 1048576) TotalSpace
from
dba_data_files
group by
tablespace_name
) df
(select
tablespace_name
round(sum(bytes) / 1048576) FreeSpace
from
dba_free_space
group by
tablespace_name
) fs
where
df.tablespace_name fs.tablespace_name;


 
Is this answer useful? Yes | No
August 02, 2006 10:51:10   #5  
dmadhusudhanarao Member Since: August 2006   Contribution: 7    

RE: What are the advantages and disadvantages of View?...

advantages

1. hiding the data.

2. you can use two tables data in view.

3. security will be there.

disadvantages

1.when table is not there view will not work.

2. dml is not possible if that is more than one table.

3. it is also database object so it will occupy the space.


 
Is this answer useful? Yes | No
November 26, 2006 03:07:33   #6  
YOGENDRA SHRIVASTAVA        

RE: What are the advantages and disadvantages of View?...

hello sir

plz clear that. is view has storage space. if not then y u written this

it is also database object so it will occupy the space.


 
Is this answer useful? Yes | No
November 26, 2006 21:26:09   #7  
Thulasidas        

RE: What are the advantages and disadvantages of View?...
another disadvantage of a view is it affects performance. Querying from view takes more time than directly querying from the table
 
Is this answer useful? Yes | No
December 02, 2006 12:59:32   #8  
Indira        

RE: What are the advantages and disadvantages of View?...
Hi Only the view definition is stored as a select statement in the data dictionary. Each time a view is accessed the select statement is executed and the rows are retrieved. It does not own data of its own so occupies negligable amount of space. It is also useful in hiding some columns from the original tables and the user can be restrictedfrom viewing all the columnsIndira
 
Is this answer useful? Yes | No
April 26, 2007 09:50:54   #9  
DHRUVA SEN GUPTA        

RE: What are the advantages and disadvantages of View?...
View based on multiple tables are up-datable using INSTEAD OF triggers.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape