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 column table

Re: variable column table

From: Jan Gelbrich <j_gelbrich_at_westfalen-blatt.de>
Date: Wed, 28 May 2003 09:54:26 +0200
Message-ID: <bb1q2o$4fdnb$1@ID-152732.news.dfncis.de>


"Jan Gelbrich" <j_gelbrich_at_westfalen-blatt.de> schrieb im Newsbeitrag news:bb1pv0$4spas$1_at_ID-152732.news.dfncis.de...
> "Billy Verreynne" <vslabs_at_onwe.co.za> schrieb im Newsbeitrag
> news:bb1o36$r5s$1_at_ctb-nnrp2.saix.net...
> > Jan Gelbrich wrote:
> >
> > > But, IMHO, this is perfect **CRAP** . It has no normal form at all.
> > > Then You will end up with **multiple** references to the field_names,
> much
> > > hard-coded SQL & PL/SQL,
> > > very error_prone, and fk constraints becoming "virtual", as it bcomes
> > > fuzzy.
> >
> > Yes and no. It depends on what you design the model for. So before
ranting
> > too much, I suggest you look at the basic problem first. I have an easy
> > example.
> >
> > Take a Windows INI file (or take multiple /etc/*conf files in Unix). It
> has
> > multiple sections (or filenames in Unix). Each section/file has
name-value
> > pairs. Now design a db model for it.
> >
> > I will be very interested to see how you solve this ito a logical db
> design.
> >
> Hi, Billy,
>
> sorry if I overdid my ranting,
> it is just deriving from my everyday struggle
> with a data model like this ...
>
> Now,
> if I understand Your problem right,
> You want to store ini files in Your db,
> as You describe it,
> so, what about this one ?
>
> CREATE TABLE inifiles
> (
> id number(10),
> section_name varchar2(50),
> value_name varchar2(50),
> value varchar2(50)
> )
> /
>

... and if You have many files, too,
add another column:

CREATE TABLE inifiles
(

    id number(10),
    file_name varchar2(50),
    section_name varchar2(50),

    value_name      varchar2(50),
    value      varchar2(50)

)
/

hth, Jan Received on Wed May 28 2003 - 02:54:26 CDT

Original text of this message

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