# Databases > SQL Difference between view and index

## deepanathan

Please tell me the difference between view and index 

cheers
Deepa

----------


## debasisdas

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.

----------


## ashalalaxmi2002

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.

----------


## verticalbar

> 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.

----------


## susarlasireesha

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.

----------


## chaitueeturi

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

----------


## rahulg5211

difference between record and index

----------


## tykarthick

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

----------

