Simple persistent object storage: seeking advice on storing user defined, runtime defined abstract datatypes into Oracle

From: Jerry Bakin <bakinj_at_segasoft.com>
Date: 1997/11/13
Message-ID: <64fgsa$kle1_at_adventure.segasoft.com>#1/1


I need to store/retrieve *arbitrary* user defined abstract data into Oracle.

Well these data are LISP lists, meaning that the type and number of fields can vary with each record.

LISP lists consist of any number of about 10 different types of data including pointers, numbers, strings, arrays, boolean values, and structure fields. I won't know until runtime, and in fact, the user can create new datatypes during execution itself.

(You might think of a personal information manager where the user gets to define their own favorite table by dragging and dropping names, addresses, phone number fields, or even defining their own fields. This isn't at all what we're doing, but it's somewhat analogous.)

For each record, it is important to capture the exact type of each field, as well as the original order of that field within the record.

Each record probably has a alphanumeric name of some sort.

I need some advice on how to efficiently design a database.

It strikes me that I could:

 Create a table of RecordHeaders with records of (RecordName, RecordID) where

   RecordName is a string, and
   RecordID is a unique sequence used to point to field records

 Create a table of RecordFields with records of (RecordID, FieldIndex, FieldID) where

   RecordID is an entry from RecordHeaders,    FieldIndex is a unique sequence starting from 1 capturing the order of the field within the original record,

   FieldID is a unique sequence used to point to field values

For each field type, I could create a table to store the field values. Something like:
  NumberValues with records of (FieldID, NumberValue), or   StringValues with records of (FieldID, StringValue), or   PairValues with records of (FieldID, Pointer1Value, Pointer2Value)

This will work, but when I suggest this to the Database Administrators their face gets to looking all twisted and funny, and I generally get the impression they are wishing me into the cornfield.

I want to make the DBA's happy, but I do have my requirements.

What would make for a more effective database design?

Thank you,

Jerry Bakin
bakinj_at_segasoft.com Received on Thu Nov 13 1997 - 00:00:00 CET

Original text of this message