explosion of tiny tables representing multiple fields--Is this necessary?

From: Benjamin Weaver <benjamin(dot)weaver(at)classics(dot)oxford(dot)ac(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: explosion of tiny tables representing multiple fields--Is this necessary?
Date: 2006-11-02 16:36:49
Message-ID: 20061102163649.8BB195A078@webmail218.herald.ox.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear PostGreSQL experts,

I am working with text objects. A text object will have lots of fields that
are potentially multiple. There may be more than one author, more than one
modern editor, more than one edition number, etc.

These potentially multiple fields are, in my schema, nothing more than
strings.

For my purposes, multiple strings of this kind would consist of
composed/aggregated objects stored as a member in an instance of a
MyTextObject. The member would be some kind of collection. Like this:


public Class MyTExtObject

Vector authors; //simple String for author name
Vector editionNumbers; //simple string for editionNumber
...

}//MyTextObject

My question: is there any legitimate way around creating lots of tiny tables,
one for each multiple field, when the multiple fields are nothing more than
strings?

We will be doing lots of involved queries, and although I have a fair amount
of experience with SQL, this profusion of tables would be a pain to implement.
But I don't see any way around creating them when the relation between the
MyTextObject and the various fields is one-to-many.

--
Benjamin Weaver
Faculty Research Associate, Imaging Papyri Projects, Herculaneum Society,
Oxford
email: benjamin(dot)weaver(at)classics(dot)ox(dot)ac(dot)uk
phone: (0)1865 288260

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-11-02 16:39:22 Re: lots of values for IN() clause
Previous Message Gurjeet Singh 2006-11-02 16:33:28 Re: lots of values for IN() clause