Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: variable record question

Re: variable record question

From: <sybrandb_at_my-dejanews.com>
Date: Wed, 26 May 1999 12:12:35 GMT
Message-ID: <7igofi$kh6$1@nnrp1.deja.com>


In article <374BD299.1B13D5EA_at_aol.com>,   jayms_at_aol.com wrote:
> I am involved in a project where we will be moving mainframe data
(from
> Unisys DMSII) to Oracle for data warehousing. DMSII supports
> variable-length records, where the length will depend on the type of
> record. For example, a note might be a payment, which would have
> payment amount and some other info, or a comment, which would have
> different text info, etc.
>
> There is a fixed portion to the record, a record type, and then the
> variable portion. There are about 20 different types of records. Is
> there a way to do this in SQL? It is important that this all be in
one
> table so that it can be searched in order.
>
>

The usual solution (not necessarily a good one from the relational perspective) is making sure all elements of the variable portion make it as separate columns in the table, and all null allowed. The record type would determine which columns are going to be non-null. It should be advisable to have insert and update triggers checking for the correct combinations of columns.
Of course this is 'porting' your app only. It might need to be redesigned in the future.

Hth,
Sybrand Bakker, Oracle DBA

--
Sybrand Bakker, Oracle DBA

All standard disclaimers apply


--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Wed May 26 1999 - 07:12:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US