I interpreted "myth" or a "mythter"'s original post as a question about nested tables (or varrays.) I don't like nested tables myself, but based on Santa's example (and Dima's)...
REM Nested Tables Example
REM Create the object type with the fields that will be nested within the parent table
CREATE OR REPLACE TYPE "PULSE_RATE" AS OBJECT
( READING_DATE date,
READING_VALUE number
);
Rem Create a table object for those fields
CREATE OR REPLACE TYPE "VITALS_NT" AS
TABLE OF PULSE_RATE;
Rem Create the parent table with the nested table object, make sure you tell oracle
REM how to store the nested table object.
CREATE TABLE PATIENT
(patient_ID number NOT NULL,
last_name varchar2(40) NULL,
first_name varchar2(20) NULL,
vitals SYSTEM.VITALS_NT NULL)
NESTED TABLE VITALS STORE AS PATIENT_VITALS;
REM Insert some values
INSERT INTO PATIENT VALUES(2004,'Mufasa','Santa',VITALS_NT(PULSE_RATE(sysdate,85)));
INSERT INTO PATIENT VALUES(2001,'Too','DB',VITALS_NT(PULSE_RATE(sysdate,81)));
INSERT INTO PATIENT VALUES(2001,'Too','DB',VITALS_NT(PULSE_RATE(sysdate,0)));
REM don't forget to commit them
commit;
REM Select them
select patient_id,last_name,first_name,b.reading_date,b.reading_value
from patient a, table(a.vitals) b
order by patient_id, last_name,first_name,b.reading_date
;
====
Output Example:
PATIENT_ID LAST_NAME FIRST_NAME READING_D READING_VALUE
---------- ---------------------------------------- -------------------- --------- -------------
2001 Too DB 20-NOV-03 81
2001 Too DB 20-NOV-03 0
2001 Too DB 20-NOV-03 81
2001 Too DB 20-NOV-03 0
2002 TOO DB 20-NOV-03 85
2004 Mufasa Santa 20-NOV-03 85
2004 TOO DB 20-NOV-03 85
Personnally, I prefer SantaMufas's method of Normalizing the data.
-david