Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using PLSQL Records.....
Miggins wrote:
>Each,
>
>Am considering using plsql records purely to group related variables
>together in my package. For example i may have variables to do with
>subscribtions so would create the following
>
>TYPE r_subs_rec IS RECORD (sub_date date,
> sub_amt number
>(6,2),
> sub_number integer);
>
>Instead of just creating three seperate variables......its just for
>ease of finding things and also tidyness.
>
>Anyone think this is a bad/good idea? Should I not use records for this
>reason?
>
>Cheers
>
>
>
Seems like a good idea to me. The record fields should hold values that
describe the attributes of an instance of an entity, or put another way
the current values of the record fields should be related in that they
describe the same logical object, e.g. the amount, date and number of a
particular financial transaction. It would not make sense if you store
the amount of transaction A, and the date of transaction B, in the same
record.
Records also make perfect sense when they correspond with rows in database tables ... %ROWTYPE
Martin Received on Fri Feb 24 2006 - 16:19:49 CST