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. |
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...
|
|||||||
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
Re: Difference between view and index
Quote:
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. |
|
|||
|
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. |
|
|||
|
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 |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
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 |