Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Difference between view and index

This is a discussion on Difference between view and index within the SQL forums, part of the Databases category; Please tell me the difference between view and index cheers Deepa...

Go Back   Geeks Talk > Databases > SQL
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 01-10-2008
Junior Member
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
deepanathan is on a distinguished road
Smile Difference between view and index

Please tell me the difference between view and index

cheers
Deepa
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-10-2008
Moderator
 
Join Date: Jun 2007
Location: Bangalore,India
Posts: 1,853
Thanks: 9
Thanked 168 Times in 142 Posts
debasisdas has a spectacular aura aboutdebasisdas has a spectacular aura about
Re: Difference between view and index

View is a logical table. It is a physical object which stores data logically. View just refers to data that is tored in base tables.

Indexes are pointres that maps to the physical address of data. So by using indexes data manipulation becomes faster.
Reply With Quote
  #3 (permalink)  
Old 01-10-2008
Contributing Member
 
Join Date: Sep 2007
Location: hyderabad
Posts: 37
Thanks: 5
Thanked 4 Times in 4 Posts
ashalalaxmi2002 is on a distinguished road
Re: Difference between view and index

view:

view is also a one of the database object.
view contains logical data of a base table.where base table has actual data(physical data).another way we can say view is like a window through which data from table can be viewed or changed.

index:

indexes will be created on columns.by using indexes the fetching of rows will be done quickly.
Reply With Quote
  #4 (permalink)  
Old 01-10-2008
Junior Member
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
verticalbar is on a distinguished road
Re: Difference between view and index

Quote:
Originally Posted by ashalalaxmi2002 View Post
view:

view is also a one of the database object.
view contains logical data of a base table.where base table has actual data(physical data).another way we can say view is like a window through which data from table can be viewed or changed.

index:

indexes will be created on columns.by using indexes the fetching of rows will be done quickly.
View: It is just simply a stored SQL statement with an object name. It can be used in any SELECT statement like a table.
Index: It is a way of cataloging the table-info based on 1 or more columns. One table may contain one/more indexes. Indexes are like a 2-D structure having ROWID & indexed-column (ordered). When a table-data is retrieved based on this column (col. which are used in WHERE clause), this index gets into the picture automatically and it's pointer search the required ROWIDs. These ROWIDs are now matched with actual table's ROWID and the records from table are shown.
Reply With Quote
  #5 (permalink)  
Old 01-11-2008
Expert Member
 
Join Date: Apr 2007
Location: Bangalore
Posts: 515
Thanks: 29
Thanked 63 Times in 61 Posts
susarlasireesha will become famous soon enough
Re: Difference between view and index

Index
An index is a performance-tuning method of allowing faster retrieval of records. An index creates an entry for each value that appears in the indexed columns.

View
A view is a logical entity. It is a SQL statement stored in the database in the system tablespace. Data for a view is built in a table created by the database engine in the TEMP tablespace.
Reply With Quote
  #6 (permalink)  
Old 01-23-2008
Junior Member
 
Join Date: Jan 2008
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
chaitueeturi is on a distinguished road
Re: Difference between view and index

a view is stored as a select statement in database.it provides security for both data and table.That means if we drop view no damage occurs to table.And the n/w traffic can be controlled,because a large query which occupies more memory is stored as a view.

an index is used to make the search easy.In sql*plus environment data will be stored in B*tree model(looks like binary search tree in data structures).suppose u have created an index on particular column and u want search one value.just draw ur self a binary search tree and try serach a value u can observe how easy it is when u create an index.If there is no index the select statement has to execute for each and every record of table which is time consuming
Reply With Quote
  #7 (permalink)  
Old 10-06-2009
Junior Member
 
Join Date: Oct 2009
Location: lucknow
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
rahulg5211 is on a distinguished road
Re: Difference between view and index

difference between record and index
Reply With Quote
  #8 (permalink)  
Old 10-07-2009
Junior Member
 
Join Date: Oct 2009
Location: India
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
tykarthick is on a distinguished road
Re: Difference between view and index

View:
To view only particular column in a table.
Index:
Index is used for searching purpose.
Reply With Quote
Reply

  Geeks Talk > Databases > SQL

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
B-tree index and Bitmap index Lokesh M Data Warehousing 1 12-14-2008 06:01 AM
Normal View, Materialised View and Bitmap Index Geek_Guest Oracle 3 05-28-2008 12:59 AM
what is the difference between Primary Key and Index Key ? skravipati SQL 1 09-07-2007 01:46 AM
How can we know that the query are not using index Geek_Guest Oracle 2 07-05-2007 08:34 AM
index rakhi1275 Data Warehousing 1 05-11-2007 06:54 AM


All times are GMT -4. The time now is 02:50 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved