Re: Flexible columns
- From: Gene Wirchenko <genew@xxxxxxxx>
- Date: Thu, 10 May 2007 17:08:07 -0700
herbasher <robmnl@xxxxxxxxx> wrote:
I am developing a database system that will allow users to store any
object whatsoever in a database.
Usually a database has predefined tables and fields.
What I need, is a table that basically has any field.
So I want to be able to say,
INSERT INTO objects (type, name) VALUES ('person', 'John')
INSERT INTO objects (type, name, num_employees) VALUES ('company',
'Apple', '10.000')
INSERT INTO objects (type, name, color) VALUES ('fruit', 'banana',
'yellow')
And that without defining the table columns. I just want to be able
to *use* those columns, they can default to varchar.
That's the kind of flexibility I need. Any ideas in this direction?
Anything is appreciated. Someone must have tried this before.
Oh, yes. It has been done before. It is called
Entity-Attribute-Value, and it is a very BAD thing.
Why not just use a shoebox?
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.
.
- References:
- Flexible columns
- From: herbasher
- Flexible columns
- Prev by Date: Flexible columns
- Next by Date: Re: Flexible columns
- Previous by thread: Flexible columns
- Next by thread: Re: Flexible columns
- Index(es):
Relevant Pages
|