Results 1 to 8 of 8

Thread: Difference between view and index

  1. #1
    Junior Member
    Join Date
    Jan 2008
    Answers
    1

    Smile Difference between view and index

    Please tell me the difference between view and index

    cheers
    Deepa


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    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.


  3. #3
    Contributing Member
    Join Date
    Sep 2007
    Answers
    35

    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.


  4. #4
    Junior Member
    Join Date
    Jan 2008
    Answers
    1

    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.


  5. #5
    Expert Member
    Join Date
    Apr 2007
    Answers
    500

    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.


  6. #6
    Junior Member
    Join Date
    Jan 2008
    Answers
    24

    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


  7. #7
    Junior Member
    Join Date
    Oct 2009
    Answers
    1

    Re: Difference between view and index

    difference between record and index


  8. #8
    Junior Member
    Join Date
    Oct 2009
    Answers
    4

    Re: Difference between view and index

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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact