If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > What is the difference btw Varray and Nested Tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-21-04, 07:24
nashchow nashchow is offline
Registered User
 
Join Date: Mar 2004
Posts: 3
What is the difference btw Varray and Nested Tables

Hi

I am totally new to the object relational database. I am currently reading some features of Oracle 9i and don't understand the difference between varray and nested tables. Can anyone please explain what situation we should use varray and what circumstance we should use nested tables?

Thanx
Reply With Quote
  #2 (permalink)  
Old 04-21-04, 07:34
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Re: What is the difference btw Varray and Nested Tables

(This question belongs in the Oracle forum, not here.)

A Varray is an ordered array (elements are indexed 1,2,3,...), which is physically stored in the table it belongs to.

A Nested Table is actually a separate physical table but made to look like it is nested within the table it belongs to. There is no implicit ordering (no index 1,2,3,... defined), rather you reference the data by key values.

I would never use either in the database as they add a lot of SQL complexity for no gain. In a PL/SQL program you might use a nested table so that you can select from an in-memory array as if it were a real table.
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On